- seltestng
- Posts : 2
Join date : 2010-12-02
RC Browser closed in the middle of execution
Thu Dec 02, 2010 1:58 pm
Hi All,
I have just started learning Selenium. I am trying to use Selenium RC for automating my application.
I am trying a test case to just login to my application.
When I run the test case, two browsers are opened. One is Selenium RC server and the other is the Base URL I have given in the test case. But after the selenium.open statement, the browser opened for the base url gets closed and the base url is opened in the selenium RC server browser. The test case does not execute further.
Please find below the code I am using
private Selenium selenium = new DefaultSelenium( "localhost",4444,"*firefox",BASE_URL);
selenium.selectWindow(null);
selenium.setTimeout("0");
selenium.open(BASE_URL);
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
selenium.setTimeout("0"); // Execution stops here
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
selenium.type("username", "seltest");
selenium.type("password", "seltest");
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
selenium.click("loginBtn");
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
selenium.close();
Please help me in solving this problem. I am not able to proceed further.
Thanks,
Selenium Tester
I have just started learning Selenium. I am trying to use Selenium RC for automating my application.
I am trying a test case to just login to my application.
When I run the test case, two browsers are opened. One is Selenium RC server and the other is the Base URL I have given in the test case. But after the selenium.open statement, the browser opened for the base url gets closed and the base url is opened in the selenium RC server browser. The test case does not execute further.
Please find below the code I am using
private Selenium selenium = new DefaultSelenium( "localhost",4444,"*firefox",BASE_URL);
selenium.selectWindow(null);
selenium.setTimeout("0");
selenium.open(BASE_URL);
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
selenium.setTimeout("0"); // Execution stops here
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
selenium.type("username", "seltest");
selenium.type("password", "seltest");
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
selenium.click("loginBtn");
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
selenium.close();
Please help me in solving this problem. I am not able to proceed further.
Thanks,
Selenium Tester
- PriyankaRegular Participant
- Posts : 27
Join date : 2010-10-04
Re: RC Browser closed in the middle of execution
Thu Dec 02, 2010 2:11 pm
Hi... Try this
public void Login()
{
selenium.open(BASE_URL);
selenium.type("username", "seltest");
selenium.type("password", "seltest");
selenium.click("loginBtn");
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
}
Please use the above commands(only)....I hope u can login successfully ..
public void Login()
{
selenium.open(BASE_URL);
selenium.type("username", "seltest");
selenium.type("password", "seltest");
selenium.click("loginBtn");
selenium.waitForPageToLoad(MAX_WAIT_TIME_IN_MS);
}
Please use the above commands(only)....I hope u can login successfully ..
- seltestng
- Posts : 2
Join date : 2010-12-02
Re: RC Browser closed in the middle of execution
Thu Dec 02, 2010 2:18 pm
Thanks for the quick response.
I tried with the above code. But the problem still exist.
The browser closes after open statement and the execution gets halted.
In console I can see the last message
Command request: open[http://example.tools.com/app-admin/, ] on session 416d3231f0b544eda749fb31e0b11e53
I tried with the above code. But the problem still exist.
The browser closes after open statement and the execution gets halted.
In console I can see the last message
Command request: open[http://example.tools.com/app-admin/, ] on session 416d3231f0b544eda749fb31e0b11e53
- Unable to start script execution in IE browser it is showing IE Script Error with 'Yes' or 'No' buttons for Continue script execution or no.
- Could not start Selenium session: Failed to start new browser session: Error while launching browser
- Issues with IE close browser, Firefox window focus. unable to get screenshots any browser
- Selenium.SeleniumException : Failed to start new browser session: Error while launching browser
- Open Browser Keyword of Selenium2Library (robotframework) is giving: is not a supported browser.
Permissions in this forum:
You cannot reply to topics in this forum