The AUT contains the login page which validates the user credentials. Once successful, the user needs to hit a new URL in a new tab to access the actual application.

Is it possible to automate the above scenario using selenium RC?

有帮助吗?

解决方案

Yes it's possible, but I'd recommend using Selenium WebDriver as it's the current version. Selenium RC is very old.

Using Selenium WebDriver:

driver.navigate().to("http://aut/login");
driver.... // login logic like setting the user/pass clicking login.
...

driver.navigate().to("http://somenewurl.com");
// continue testing here...

If you are adamant on remaining with Selenium 1 (which i could understand if you already have a big suite in it..):

selenium.open("http://aut/login");
selenium... // login logic here
...

selenium.open("http://somenewurl.com");
// continue testing here.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top