I have the latest Selenium, OSX and Safari versions but I'm unable to open Safari Driver using a code as simple as this:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.safari.SafariDriver;
public class SafariDriverDemo {
public static void main(String[] args) throws InterruptedException {
WebDriver driver;
driver = new SafariDriver();
String baseURL = "https://www.google.com";
driver.get(baseURL);
Thread.sleep(3000);
driver.quit();
}
}
- What I get in the console is the following: "Password:Password:Password:"
- And regardless of what password I write, the console displays: Screenshot 2
This despite me having enabled 'Allow Remote Automation'. I've tried authorising the driver from the Terminal by typing '/usr/bin/safaridriver'and this is the result
Could not start server: must specify at least one configuration argument.
Usage: safaridriver [options]
-h, --help Prints out this usage information.
-p, --port Port number the driver should use. If the server
is already running, the port cannot be changed.
If port 0 is specified, a default port will be used
I don't know what action to take from here, maybe the issue can be fixed from the console.
Aucun commentaire:
Enregistrer un commentaire