[英]How to run chrome browser in RSelenium
My OP is Windows. 我的OP是Windows。
I have installed RSelenium and I want to open the chrome browser (default browser in RSelenium is Firefox) 我已经安装了RSelenium,并且想要打开chrome浏览器(RSelenium中的默认浏览器是Firefox)
I have download the google chrome driver from here and latest version of selenium standalone server and I run it from command line using this java -jar selenium-server-standalone-3.3.1.jar
in command line 我已经从这里下载了google chrome驱动程序以及selenium独立服务器的最新版本,并在命令行中使用此
java -jar selenium-server-standalone-3.3.1.jar
从命令行运行了它
after that in RStudio I run this: 之后,在RStudio中运行以下命令:
startServer()
checkForServer()
mybrowser <- remoteDriver(browserName = "chrome")
mybrowser$open()
but it stacks in this: 但它堆叠在:
[1] "Connecting to remote server"
it doesn't give any error. 它没有任何错误。 Any idea how can I open and use chrome browser?
知道如何打开和使用Chrome浏览器吗? Could be possible to use the chrome of my system?
可以使用系统的Chrome吗?
try this one this should be work add selenium-server-standalone-3.3.1.jar as external jar file,**Right click on project->properties->java build path->libraries->add external jar.**and update project and add in setup 试试这个,这应该是可行的。将selenium-server-standalone-3.3.1.jar添加为外部jar文件,**右键单击project-> properties-> java build path-> libraries-> add external jar。更新项目并添加设置
WebDriver driver=new ChromeDriver(); WebDriver driver = new ChromeDriver();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.