Search in sources :

Example 1 with ActiveNodeDeterminer

use of com.mycompany.app.ActiveNodeDeterminer in project selenium_java by sergueik.

the class GridInfoTest method setup.

@BeforeClass
public void setup() throws Exception {
    determiner = new ActiveNodeDeterminer();
    determiner.setGridPort(PORT);
    determiner.setGridHostName(IP);
    URL url = new URL("http://" + IP + ":" + PORT + "/wd/hub");
    getOsName();
    System.setProperty("webdriver.gecko.driver", osName.toLowerCase().startsWith("windows") ? new File("c:/java/selenium/geckodriver.exe").getAbsolutePath() : "/tmp/geckodriver");
    System.setProperty("webdriver.firefox.bin", osName.toLowerCase().startsWith("windows") ? new File("c:/Program Files (x86)/Mozilla Firefox/firefox.exe").getAbsolutePath() : "/usr/bin/firefox");
    // use legacy FirefoxDriver
    DesiredCapabilities capabilities = DesiredCapabilities.firefox();
    capabilities.setCapability("marionette", false);
    driver = new RemoteWebDriver(url, capabilities);
}
Also used : RemoteWebDriver(org.openqa.selenium.remote.RemoteWebDriver) DesiredCapabilities(org.openqa.selenium.remote.DesiredCapabilities) ActiveNodeDeterminer(com.mycompany.app.ActiveNodeDeterminer) File(java.io.File) URL(java.net.URL) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

ActiveNodeDeterminer (com.mycompany.app.ActiveNodeDeterminer)1 File (java.io.File)1 URL (java.net.URL)1 DesiredCapabilities (org.openqa.selenium.remote.DesiredCapabilities)1 RemoteWebDriver (org.openqa.selenium.remote.RemoteWebDriver)1 BeforeClass (org.testng.annotations.BeforeClass)1