0
我有最新的硒,OSX和Safari浏览器版本,但我不能用这样简单代码,打开Safari浏览器驱动程序:硒:SafariDriver在MacOSX上不开放塞拉利昂
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();
}
}
- 我能得到什么在控制台如下:“密码:密码:密码:”
- 而且不管我写什么密码,在控制台显示:Screenshot 2
这尽管已经使我“允许远程自动化'。我试过授权从终端中的驱动通过键入“在/ usr/bin中/ safaridriver'and这是结果
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
我不知道从这里采取什么行动,也许这个问题可以固定从控制台。
请提及实际版本号。 “最新”已于2017年5月4日发生变化。您的问题的答案也可能不同。 –