Selenium WebDriver Cheat Sheet – List of Selenium Drivers

Posted by

List of Selenium Drivers:

Cheat Sheets are the most effective way to teach things to others, there is an acute shortage of Selenium WebDriver Cheat Sheets, so we have decided to create one yourself for you guys. This cheat sheet for selenium WebDriver provides all the important and commonly used methods, operations and commands for your easy daily access.

Here You may Fide Code Example :

package Demo_driver;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.opera.OperaDriver;
import org.openqa.selenium.phantomjs.PhantomJSDriver;
import org.openqa.selenium.safari.SafariDriver;
import org.openqa.selenium.support.events.EventFiringWebDriver;

public class Demo_driver
{

public static <HtmlUnitDriver> void main(String[] args)
{
//Declare WebDriver Class Object here
WebDriver driver;

// List of different Browsers you can use in Selenium WebDriver

driver = new ChromeDriver();
driver = new FirefoxDriver();
driver = new SafariDriver();
driver = new OperaDriver();
driver = new InternetExplorerDriver();
driver = new EdgeDriver();
driver = new EventFiringWebDriver(driver);
driver = new PhantomJSDriver();

}
}

Leave a Reply

Your email address will not be published. Required fields are marked *