Note : Please see "Selenium 4" before starting this session.
Note : get() and navigate().to() method perform same work.
We start using standalone web application "Actitime" for all our future session.
1. Open Actitme Application in firefox browser. using GET() method.
package shirageri.blog;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class HelloBrowser5 {
public static void main(String[] args) throws InterruptedException {
String URL = "http://127.0.0.1:88/login.do";
WebDriver driver = new FirefoxDriver();
//get() method will open the applicatoin mentioned in its arg section
driver.get(URL );
}
}
2. Open Actitme Application in firefox browser. using navigate().to(URL) method.
package shirageri.blog;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class HelloBrowser6 {
public static void main(String[] args)
{
String URL = "http://127.0.0.1:88/login.do";
WebDriver driver = new FirefoxDriver();
//navigate().to
driver.navigate().to(URL);
}
}
No comments:
Post a Comment