Edge Driver
This commit is contained in:
@@ -7,8 +7,11 @@ import org.openqa.selenium.JavascriptExecutor;
|
|||||||
import org.openqa.selenium.WebDriver;
|
import org.openqa.selenium.WebDriver;
|
||||||
import org.openqa.selenium.chrome.ChromeDriver;
|
import org.openqa.selenium.chrome.ChromeDriver;
|
||||||
import org.openqa.selenium.chrome.ChromeOptions;
|
import org.openqa.selenium.chrome.ChromeOptions;
|
||||||
|
import org.openqa.selenium.edge.EdgeDriver;
|
||||||
|
import org.openqa.selenium.edge.EdgeOptions;
|
||||||
import org.openqa.selenium.firefox.FirefoxDriver;
|
import org.openqa.selenium.firefox.FirefoxDriver;
|
||||||
import org.openqa.selenium.firefox.FirefoxOptions;
|
import org.openqa.selenium.firefox.FirefoxOptions;
|
||||||
|
import org.openqa.selenium.safari.SafariDriver;
|
||||||
import org.testng.annotations.AfterClass;
|
import org.testng.annotations.AfterClass;
|
||||||
import org.testng.annotations.BeforeClass;
|
import org.testng.annotations.BeforeClass;
|
||||||
|
|
||||||
@@ -26,7 +29,22 @@ public class BaseTest {
|
|||||||
+ File.separator + "resources"
|
+ File.separator + "resources"
|
||||||
+ File.separator + "geckodriver-macos");
|
+ File.separator + "geckodriver-macos");
|
||||||
driver = new FirefoxDriver(options);
|
driver = new FirefoxDriver(options);
|
||||||
} else {
|
} else if (browser != null && browser.equalsIgnoreCase("edge")) {
|
||||||
|
EdgeOptions options = new EdgeOptions();
|
||||||
|
System.setProperty("webdriver.edge.driver",
|
||||||
|
"src" + File.separator + "test"
|
||||||
|
+ File.separator + "resources"
|
||||||
|
+ File.separator + "msedgedriver-macos");
|
||||||
|
driver = new EdgeDriver(options);
|
||||||
|
}
|
||||||
|
else if(browser != null && browser.equalsIgnoreCase("safari")){
|
||||||
|
System.setProperty("webdriver.safari.driver",
|
||||||
|
"src" + File.separator + "test"
|
||||||
|
+ File.separator + "resources"
|
||||||
|
+ File.separator + "safaridriver-macos");
|
||||||
|
driver = new SafariDriver();
|
||||||
|
}
|
||||||
|
else {
|
||||||
ChromeOptions options = new ChromeOptions();
|
ChromeOptions options = new ChromeOptions();
|
||||||
System.setProperty("webdriver.chrome.driver", "src"
|
System.setProperty("webdriver.chrome.driver", "src"
|
||||||
+ File.separator
|
+ File.separator
|
||||||
|
|||||||
BIN
src/test/resources/msedgedriver-linux
Executable file
BIN
src/test/resources/msedgedriver-linux
Executable file
Binary file not shown.
BIN
src/test/resources/msedgedriver-macos
Executable file
BIN
src/test/resources/msedgedriver-macos
Executable file
Binary file not shown.
BIN
src/test/resources/msedgedriver.exe
Executable file
BIN
src/test/resources/msedgedriver.exe
Executable file
Binary file not shown.
Reference in New Issue
Block a user