سؤال

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