This file contains 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
#!/bin/bash | |
case "${1:-''}" in | |
'start') | |
if test -f /tmp/selenium-grid.pid | |
then | |
echo "Selenium Grid is already running." | |
else | |
java -jar /home/bkr/selenium/selenium-server-standalone-2.9.0.jar -port 5555 -role hub > /var/log/selenium/selenium-grid.log 2> /var/log/selenium/selenium-grid-error.log & echo $! > /tmp/selenium-grid.pid | |
echo "Starting Selenium Grid..." |
This file contains 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
URL gridUrl = new URL("url"); | |
EdgeOptions edgeOptions = new EdgeOptions(); | |
edgeOptions.setPlatformName(String.valueOf(Platform.LINUX)); | |
edgeOptions.addArguments("no-sandbox"); | |
// EdgeDriver driver = new EdgeDriver(edgeOptions); | |
EdgeDriver driver = new EdgeDriver(); | |
// RemoteWebDriver driver = new RemoteWebDriver(gridUrl); | |
DevTools devTools = driver.getDevTools(); | |
devTools.createSession(); |