WebDrivers and Instantiation process


Below are the list of driver that can be use to execute the automation scripts.

Name of Driver = HtmlUnitDriver
OS Supported = All
Instantiation process:

//HtmlUnitDriver Instantiation process
HtmlUnitDriver driver = new HtmlUnitDriver(BrowserVersion.FIREFOX_3_6);

//Using Capabilities 
HtmlUnitDriver driver = new HtmlUnitDriver(capabilities);

===================================================================

Name of Driver =FirefoxDriver
OS Supported = All
Instantiation process:

//FireFoxDriver Instantiation process
WebDriver  driver = new FirefoxDriver();

===================================================================

Name of Driver = InternetExplorerDriver
OS Supported = Windows
Instantiation process -

//Set Webdriver.ie.driver  property 
System.setProperty("Webdriver.ie.driver","DriverPath/IEDriverServer.exe");
//Instantiate a WebDriver  implementation
WebDriver  driver = new InternetExplorerDriver ();

===================================================================

Name of Driver = ChromeDriver
OS Supported = All
Instantiation process -

//Set Webdriver.chrome.driver  property 
System.setProperty("Webdriver.chrome.driver","DriverPath/chromedriver.exe");
//Instantiate a WebDriver  implementation
        WebDriver  WebDriver  = new ChromeDriver();

==================================================================

Name of Driver = SafariDriver
OS Supported = MAC
Instantiation process:

Before instantiation proces,  download SafariDriver and install on your machine
Instantiate a SafariDriver class.    
WebDriver driver = new SafariDriver(); 

No comments:

Post a Comment

Software Testing Automation Guide

  get methods in Selenium Webdriver Below are the list of get methods that can be use with driver. Get()- This com...