尝试使用RSelenium
进行导航,但是,整个页面未加载,并且缺少几个元素文本。使用FireFox(而不是Chrome)可以正常工作。
示例代码
library(RSelenium)
rD <- rsDriver(port = 4567L, browser = 'chrome')
remDr <- rD$client
remDr$navigate('https://www.r-bloggers.com/')
硒1.7.3
运行rsDriver
时的信息
[1] "Connecting to remote server"
$acceptInsecureCerts
[1] FALSE
$acceptSslCerts
[1] FALSE
$applicationCacheEnabled
[1] FALSE
$browserConnectionEnabled
[1] FALSE
$browserName
[1] "chrome"
$chrome
$chrome$chromedriverVersion
[1] "2.40.565386 (45a059dc425e08165f9a10324bd1380cc13ca363)"
$chrome$userDataDir
[1] "/var/folders/zx/2szdmkts3rdc6kw689l75gzw0000gn/T/.org.chromium.Chromium.O99TsL"
$cssSelectorsEnabled
[1] TRUE
$databaseEnabled
[1] FALSE
$handlesAlerts
[1] TRUE
$hasTouchScreen
[1] FALSE
$javascriptEnabled
[1] TRUE
$locationContextEnabled
[1] TRUE
$mobileEmulationEnabled
[1] FALSE
$nativeEvents
[1] TRUE
$networkConnectionEnabled
[1] FALSE
$pageLoadStrategy
[1] "normal"
$platform
[1] "Mac OS X"
$rotatable
[1] FALSE
$setWindowRect
[1] TRUE
$takesHeapSnapshot
[1] TRUE
$takesScreenshot
[1] TRUE
$unexpectedAlertBehaviour
[1] ""
$version
[1] "67.0.3396.87"
$webStorageEnabled
[1] TRUE
$webdriver.remote.sessionid
[1] "78f931249b9975ea0fb10c03c581f6d1"
$id
[1] "78f931249b9975ea0fb10c03c581f6d1"
答案 0 :(得分:0)
下载的是旧版本的Chrome,而不是最新版本,并且似乎可以正常运行