Created
September 8, 2020 17:07
-
-
Save ShamaUgale/9e75f153ca343db8ece5d48707b77c20 to your computer and use it in GitHub Desktop.
Selenium 4 example working with driver capabilities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.openqa.selenium.ie.InternetExplorerDriver; | |
import org.openqa.selenium.ie.InternetExplorerOptions; | |
public class InternetExplorerDriverExample { | |
final static String PROJECT_PATH = System.getProperty("user.dir"); | |
public static void main(String[] args) throws IOException { | |
System.setProperty("webdriver.ie.driver", PROJECT_PATH+ "/src/main/resources/IEDriverServer.exe"); | |
InternetExplorerOptions ops = new InternetExplorerOptions(); | |
ops.setAcceptInsecureCerts(true); | |
InternetExplorerDriver ie = new InternetExplorerDriver(ops); | |
ie.get("https://www.gmail.com"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment