Tuesday, October 03, 2006

waitForCondition vs. waitForEval in Selenium

waitForCondition vs. waitForEval in Selenium

While testing a web application with Selenium, I found lots of recommnedations to use waitForCondition to test Ajax functionalities, lots of tutorails, discussions about it in Selenium forum... with no mention to a more powerful and elegant command: waitForEval. Here are my concerns about waitForCondition which give the preference to using waitForEval:

  • You have to carefully check for any javascript syntax errors as waitForCondition hangs for any error without any log messages. (waitForEval fires error log messages for syntax problems in your javascript expressions.)
  • Upon condition failure, waitForCondition doesn’t give you diagnostic information in the log about the reason of failure in contrast to waitForEval.
  • If the element you check doesn’t get generated yet by javascript, waitForCondition will fail immediately without completing the timeout period. Hence, you need to waitForTextPresent or waitForElementPresent before waitForCondition. A third drawback that lowers it score opposed to waitForEval.

The only advantage of waitForCondition over waitForEval is that you can write in its target as much javascript statements as you can in opposition to wiatFor eval in which you write one expression to evaluate in the target column and the expected result in the value column; and this itself can be seen as advantage of waitForEval in elegance of writing the command.

Tuesday, August 01, 2006

كتب جمال سلطان

*جمال سلطان ـ حفظه الله تعالى ـ ومن كتبه:
*

http://www.hasaad.net/web/index.php?option=content&task=view&id=48&Itemid=27
**

*1) **أدب الردة*

*2) **أزمة الحوار الديني*

*3) **تجديد الصحوة الإسلامية*

*4) **تجديد الفكر الإسلامي*

*5) **ثقافة الضرار*

*6) **جذور الانحراف في
الفكر الإسلامي الحديث*

*7) **جهادنا الثقافي ـ موقف
وإشارات*

*8) **دفاع عن ثقافتنا*

*9) **الغارة على التراث
الإسلامي*

*10) **غزوة من الداخل*

*11) **فقه الحركة ـ الأصول المقدمات*

*12) **فقه الخلاف ـ مدخل إلى
وحدة العمل الإسلامي*

*13) **كلمتي للمثقفين*

*14) **مقدمات في سبيل مشروعنا
الحضاري*

*15) **أزمة المثقفين في ديار
الإسلام*

*16) **الصحوة الإسلامية وآثارها
في الفكر والمجتمع*

*17) **الإسلام ومأزق الفكر القومي *

*" مع إدراك أن قوة الأسلوب في عرض فكرة ما يفوق القوة النقدية المطلوبة في
كتب جمال سلطان ـ حفظه الله ـ مع ما فيها من سلامة الفكر وأصالته. " فهذا
الذي ذكر لا يُعد مأخذ ينقص من فكر الرجل ـ حفظه الله "*

Referrer History firefox extension

Hi, I'm happy to see some people found this extension useful. But I
won't maintain it any longer, because it was mostly a proof-of-concept
to show such feature would be useful. By the way, as a javascript
extension it is way too slow to lookup any revelant history. It has to
be developped inside the core of firefox. As I'm aware of great changes
to come in the history&bookmark management inside firefox, I'm sure such
a feature will be available in some future version. Meanwhile, as I
said, this is not a realistic project as a "simple" extension. So thank
you for your comments, and I hope I'll soon find another opportunity to
be useful to the firefox community ;)
Vincent Alsteen <https://addons.mozilla.org/firefox/9060/author/>

Sunday, June 18, 2006

Linkers and Loaders

Designing an object format

Static vs. Dynamic Memory Allocation & Stack vs. Heap

http://www.cs.jcu.edu.au/Subjects/cp2003/1997/foils/heapAndStack/heapAndStack.html

> example
>
>int x; /* static storage */
>
>void main() {
> int y; /* dynamic stack storage */
> char *str; /* dynamic stack storage */
>
> str = malloc(100); /* allocates 100 bytes of dynamic heap storage */
>
> y = foo(23);
> free(str); /* deallocates 100 bytes of dynamic heap storage */
>} /* y and str deallocated as stack frame is popped */
>
>int foo(int z) { /* z is dynamic stack storage */
> char ch[100]; /* ch is dynamic stack storage */
>
> if (z == 23) foo(7);
>
> return 3; /* z and ch are deallocated as stack frame is popped,
> 3 put on top of stack */
>}
>

Object file - Wikipedia, the free encyclopedia: "object file formats"

Static vs. Dynamic Memory Allocation & Stack vs. Heap

example
int x;                 /* static storage */  void main() {    int y;              /* dynamic stack storage */    char *str;          /* dynamic stack storage */       str = malloc(100);  /* allocates 100 bytes of dynamic heap storage */     y = foo(23);    free(str);          /* deallocates 100 bytes of dynamic heap storage */ }                      /* y and str deallocated as stack frame is popped */  int foo(int z) {       /* z is dynamic stack storage */    char ch[100];     /* ch is dynamic stack storage */     if (z == 23) foo(7);        return 3;           /* z and ch are deallocated as stack frame is popped,                           3 put on top of stack  */ }

Tuesday, June 06, 2006

That's why Dr. Ali Fahmy was arguing agains Java ...
ThStroustrup: FAQ: "Java isn't platform independent; it is a platform. Like Windows, it is a proprietary commercial platform. That is, you can write programs for Windows/Intel or Java/JVM, and in each case you are writing code for a platform owned by a single corporation and tweaked for the commercial benefit of that corporation. It has been pointed out that you can write programs in any language for the JVM and associated operating systems facilities. However, the JVM, etc., are heavily biased in favor of Java. It is nowhere near being a general reasonably language-neutral VM/OS."

Wednesday, May 24, 2006

Bloglines: "Create a personal Bloglines page loaded with the freshest news about the things you love."

Wednesday, August 31, 2005

Memory Locations
http://www.ale.org/archive/ale/ale-1997-07/msg00118.html
For curiosity, you might try printing out the locations s1 and s2 in
the different versions by using printf's %p; you would likely see that
malloc, read-only strings, and stack-based arrays are all in distant
parts of memory.

Wednesday, August 24, 2005

Don't foreget when you define a pointer to define what it points to !
struct mystuct * s;
You can't say s->v1 = ... ; as you didn't say s equals what !!
you 've to say first s = new pointer, or s = return of a function ...

Don't forget to deallocate memory of a pointer received from a function return. (you didn't allocate that memory but it was allocated by the function you called)

Note That:
In a function, you have to return an allocated pointer (or edit a pointer passed to it as an argument) and you CANNOT return address of an object, cuz the object is locally defined and will be destroyed at the function termination, so the address will be pointing to garbage.

Also, it is NOT RECOMMENDED to pass solid objects through functions, especially if they are large size objects or structures as it is overhead on the stack

Wednesday, August 10, 2005

Google capacity:

256 characters
32 words