Skip to content

Instantly share code, notes, and snippets.

@ShamaUgale
Created September 8, 2020 17:07
Show Gist options
  • Save ShamaUgale/9e75f153ca343db8ece5d48707b77c20 to your computer and use it in GitHub Desktop.
Save ShamaUgale/9e75f153ca343db8ece5d48707b77c20 to your computer and use it in GitHub Desktop.
Selenium 4 example working with driver capabilities
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