Monday, April 19, 2010

waitForPageToLoad() - Hate It!!!!

So a 'clickAndWait' in IDE is actually exported as click() and then waitForPageToLoad(). In some instance, it actually causes an expection when run in RC with the message - [timed out waiting for window '']. It simply drives me crazy when this happens for no reason!!

Anyway, some looking and found this opinion in the google gp - http://groups.google.com/group/selenium-users/browse_thread/thread/219a4a94bae46f7a/a1e810086507b733?lnk=gst&q=waitforpagetoload#a1e810086507b733

So, now if I have a click that is not actually loading a new page, but is just refreshing something on the same page, I remove the waitForPageToLoad command completely. Has had some success, though I havent tested it thoroughly in different scenarios yet.
Another thing I did - I use the -Dselenium.slowMode=2000 option to start Selenium RC. I increased it from 1000 to 2000. Hopefully that is also making the difference as now the commands are executing slower.

No comments: