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.
Monday, April 19, 2010
waitForPageToLoad() - Hate It!!!!
Friday, April 9, 2010
Starting Selenium RC
Selenium can be started with different options.
One of them is -multiWindow
I cant remember where I found this option and for what purpose I had included it in my startup, so to find out its purpose, I removed it to see what affect it has.
Removing that option has one change - previously the selenium test frame and the AUT frame would open as 2 different tabs in IE. Now, after removing the -multiWindow option, AUT runs in the same frame and I dont see the selenium test frame.
C:
cd C:\selenium-remote-control-1.0-beta-2\selenium-server-1.0-beta-2
java -jar selenium-server.jar -interactive -proxyInjectionMode -Dselenium.slowMode=1000
@REM -multiWindow
Update:
So -multiWindow was an option used prior to rel 1.0 of Selenium to load the AUT in full browser, instead of loading it in a lower frame.
Since 1.0, this is the default behavior of Selenium, so there is no need to specify that option explicitly.
I have Selenium 1.0 beta installed and I think my using -multiWindow was actually negating the default -multiWindow and hence loading AUT in lower frame.
Mystery solved!!