[英]Rselenium issue
I'm trying to scrape a website using Rselenium. 我正在尝试使用Rselenium抓取一个网站。 However I'm getting an error: 但是我遇到一个错误:
Error: checkForServer is now defunct. Users in future can find the function in
file.path(find.package("RSelenium"), "examples/serverUtils"). The
recommended way to run a selenium server is via Docker. Alternatively
see the RSelenium::rsDriver function.
My chrome is updted to version 58 and moxilla to version 45, rselenium used to work earlier but I'm not sure what happened please help guys. 我的chrome已更新为58版本,moxilla已更新为45版本,rselenium以前可以工作,但是我不确定发生了什么,请帮助大家。
The following script works for me with the new RSelenium... 以下脚本适用于新的RSelenium ...
rD <- rsDriver(port=4444L,browser="chrome")
remDr <- rD$client
remDr$navigate(url)
Just make sure you have docker account and you have it installed. 只需确保您具有docker帐户并安装它即可。
try this 尝试这个
library('RSelenium')
rD=rsDriver()
remDr =rD[["client"]]
remDr$navigate("https://www.vinmonopolet.no/vmp/Land/Chile/Gato-Negro-Cabernet-Sauvignon-2017/p/295301")
webElement = remDr$findElement('xpath', '//*[@id="product_2953010"]/span[2]')
webElement$clickElement()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.