Hi, I've been watching tutorials on how to run selenium webdriver in firefox and in chrome but they do not work for me. Only the browser opens but it does not access the page I indicated, and it tries in several ways and it does not work for me, these are my codes
firefox 55 linux 64 bits
System.setProperty("webdriver.firefox.bin", "/opt/firefox/firefox");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", false);
WebDriver driver = new FirefoxDriver(capabilities);
driver.get("https://facebook.com");
driver.close();
driver.quit();
Google Chrome 61 linux 64 bits
public static String driverPath = "/opt/google/chrome/google-chrome";
public static WebDriver driver;
public Pruebas()
{
System.out.println("launching chrome browser");
System.setProperty("webdriver.chrome.driver", driverPath);
driver = new ChromeDriver();
driver.navigate().to("https://facebook.com");
}
public static void main(String[] args) {
new Pruebas();
}
Only opens the browsers but does not go to the page I indicated
google chorme: gives timeout error
firefox: Preferring the firefox binary in these options (/ opt / firefox / firefox rather than / opt / firefox / firefox)