Selenium Topics
Selenium Webdriver
Firefox Webdriver
System.setProperty("webdriver.gecko.driver","C:\gecodriver.exe")
If want to use the legacy driver
FirefoxOptions options = new FirefoxOptions().setLegacy(true);
WebDriver driver = new FirefoxDriver(options);
----------------------------------------------------
cap.setCapability("marionette",false);
-----------Remote----------
= new RemoteWebDriver(remoteUrl,options.toCapabilities();
Language Binding --> Gecko Driver --> Marionette
( -marionette It will start server inside firefox listening by default at 2828 port) :: Firefox
Chrome Webdriver
System.setProperty("webdriver.chrome.driver","C:\chromedriver.exe")
Language binding --> Chrome driver --> Chrome browser
IE Webdriver
System.setProperty("webdriver.ie.driver","C:\iedriver.exe")
*'Unexpected error launching Internet Explorer' below, You have to set 'Enable protected mode' option in all levels with same value.
*DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
*IE browser zoom level is set to 100%
Microsoft Webdriver for Edge
System.setProperty("webdriver.edge.driver","C:\\MicrosoftWebDriver.exe")
RemoteWebdriver
DesiredCapabilities
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("nativeEvents", false);
WebDriver driver = new FirefoxDriver(dc);
Augmenter
Augmenter augumenter = new Augmenter();
File scrFile = ((TakesScreenshot) augumenter.augment(driver)).getScreenshotAs(OutputType.FILE);