Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
List down the name of the Web drivers supported by Selenium.
The name of the web drivers supported by Selenium are listed below −
Google Chrome Driver [ ChromeDriver() supports chrome ]
HTML Unit Driver [ WebClient() supports chrome, firefox and IE ]
Safari Driver [ SafariDriver() supports Safari ]
IOS Driver [ IOSDriver() supports ios ]
Android Driver [ AndroidDriver() supports Android ]
OperaChromium Driver [ ChromeDriver() supports opera ]
Gecko Driver [ FirefoxDriver() supports firefox ]
Microsoft WebDriver [ InternetExplorerDriver() supports IE ]
EventFiring WebDriver [ EventFiring Driver() supports majority of browsers ]
Code Implementation with Firefox driver
Example
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import java.util.concurrent.TimeUnit;
public class BrowserDriverScript {
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver", "C:\Users\ghs6kor\Desktop\Java\geckodriver.exe");
// working with Firefox driver
WebDriver driver = new FirefoxDriver();
String url = "https://www.tutorialspoint.com/index.htm";
driver.get(url);
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
System.out.println("Launching the url");
driver.quit();
}
} Advertisements
