Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I am facing a strange issue with Selenium RC. I have a test which runs perfectly fine when I run my selenium server manually on the default port. The test passes in seconds. However since my tests are to run on a remote machine under hudson, I run my selenium server in background as a windows service via a utility called as nssm.

When I run the same test via my server running in background, it fails with timeout. The test should not take much time to run. Here is the test I wrote

_selenium.Click("http://www.myurl.com/mypage.aspx");
_selenium.Type("Locator", "Value");
_selenium.Click("SaveLink");
_selenium.WaitForPageToLoad("30000");
share|improve this question

2 Answers 2

Try increasing pageLoad, that is -

 _selenium.WaitForPageToLoad("60000");

b/w I suggest you to not hard code wait period and read it from a method, so you could modify it in one place and have it reflected in all instances.

share|improve this answer
    
Increasing the time for WaitForPageToLoad will not have an impact till I increase the SetTimeout limit from 30000. However thanks for your suggestion. My issue was something different. When the page to test was rendered while testing, it was by default setting one of my select control to default value. Where-as when the server was running in background, it did not set the default value. I manually set the default value and test works fine. –  Ashish Jun 2 '11 at 4:06
    
Well I did not see any instance of open method in your code snippet and the only instance available is waitForpageToLoad. As far as I know, setTimeOut is used only after using open method –  Tarun Jun 2 '11 at 4:50
    
OOPS. Typo. _selenium.Click() should have been read as _selenium.Open(). Apologies. –  Ashish Jun 2 '11 at 5:31
    
You may also like to consider post your answer as "Answer" and mark it right –  Tarun Jun 2 '11 at 6:44

The issue is actually resolved. When running my test via server by opening the normal browser window, one of my required select drop-down was populated automatically. Where-as when I was trying to run my test via server running in background, the drop-down was not taking default value. I manually set the drop-down value and my tests were passing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.