we can launch the browser by following ways:
By default selenium object:
browser=new DefaultSelenium("localhost",4444, "firefox","http://www.google.com");
browser.start();
browser.windowMaximize();
browser.open("http://www.google.com");
By Webdriver Object:
WebDriver browser1;
browser1=new FirefoxDriver();
browser1.get("http://www.google.com");
By HTTPCommandProcesser object:
HttpCommandProcessor browser2;
browser2= new HttpCommandProcessor("localhost", 4444, "*firefox", "http://www.google.com");
browser2.start();
String[] url={"http://www.google.com"};
browser2.doCommand("open", url);
By WebDriver backed Selenium object:
browser1=new FirefoxDriver();
browser=new WebDriverBackedSelenium(browser1,"http://www.google.com");
browser.open("http://www.google.com");
browser.windowMaximize();
- Using default selenium object.
- Using webdriver object.
- Using HTTPCommandProcesser object.
- Using WebDriver backed Selenium object.
By default selenium object:
browser=new DefaultSelenium("localhost",4444, "firefox","http://www.google.com");
browser.start();
browser.windowMaximize();
browser.open("http://www.google.com");
By Webdriver Object:
WebDriver browser1;
browser1=new FirefoxDriver();
browser1.get("http://www.google.com");
By HTTPCommandProcesser object:
HttpCommandProcessor browser2;
browser2= new HttpCommandProcessor("localhost", 4444, "*firefox", "http://www.google.com");
browser2.start();
String[] url={"http://www.google.com"};
browser2.doCommand("open", url);
By WebDriver backed Selenium object:
browser1=new FirefoxDriver();
browser=new WebDriverBackedSelenium(browser1,"http://www.google.com");
browser.open("http://www.google.com");
browser.windowMaximize();
No comments:
Post a Comment