Using Windows 2008, C #, Firefox 3.5.1, Selenium RC (v1.0.1)
When it works, this code runs very quickly and the page loads within 0.5 seconds.
However, the session always seems unsuccessful after 3 to 5 iterations. The open command will bring up a window, but not a single page will load. Eventually, a timeout exception is returned. The page was not actually disabled. Instead, as if the request for the URL never reached the browser window.
class Program { static void Main(string[] args) { for (int i = 0; i < 10; i++) { var s = new DefaultSelenium("localhost", 4444, "firefox", "http://my.server"); s.Start(); s.SetSpeed("300"); s.Open("/"); s.WaitForPageToLoad("30000"); s.Type("//input[contains(@id, '_username')]", "my.test"); s.Type("//input[contains(@id, '_password')]", "password"); s.Stop(); } } }
(Firefox 3.6.15, Selenium RC 1.0.1, WinXP Python), - , , (, ), . , , , , , RC, - , .
, - RC ( , , ..), - , - . , , .
, , , , , , OP (.. , 3 - 5 ). , , , , , , - ( ), - - .
... ( , ), , , , . - , , , , ?
. , DefaultSelenium - 30000 , 30 . .
//selenium is DefaultSelenium instance as private member of the class boolean serverStartTry = false; int tryCount =1; while((!serverStartTry) && tryCount <= Constants.maxServerTries){ try{ this.selenium.open(ReadConFile.readcoFile("pageName")); System.out.println("Server started in try no: "+tryCount); serverStartTry =true; }catch (SeleniumException e) { System.out.println("Server start try no: "+tryCount ); System.out.println("Server Start Try: "+ serverStartTry); serverStartTry = false; tryCount++; } } if(!serverStartTry){ System.out.println("Server Not started, no. of attempts made: "+tryCount); System.exit(0); }
:
selenium.setTimeout("60000");
.