簡體   English   中英

硒問題

[英]Rselenium issue

我正在嘗試使用Rselenium抓取一個網站。 但是我遇到一個錯誤:

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.

我的chrome已更新為58版本,moxilla已更新為45版本,rselenium以前可以工作,但是我不確定發生了什么,請幫助大家。

以下腳本適用於新的RSelenium ...

rD <- rsDriver(port=4444L,browser="chrome")
remDr <- rD$client
remDr$navigate(url)

只需確保您具有docker帳戶並安裝它即可。

嘗試這個

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM