Tag: se

创build新会话后找不到元素

我创build了一个脚本来从国际象棋网站获取一些数据。 为此,我使用了本教程中的信息。 所以我遵循以下步骤: 拉图像 开始容器 我连接到这样的服务器: remDr <- remoteDriver(remoteServerAddr = "192.168.99.100", port = 4445L) remDr$open() login我做了如下: remDr$navigate("http://chesstempo.com") user <- remDr$findElement(using = "xpath", "//input[@id='usernameField']") 这工作完美。 之后,我尝试使用Windows任务计划程序(每小时检查一次)将其自动化,这就是事情开始南下的时候了。 它工作一次,然后停止运作。 我得到了日志,发现第一次尝试后会话被终止: 22:04:12.588 INFO – Session d40d129f-f15c-4ba2-83a6-9d5b16acf2d1 deleted due to client timeout 22:04:12.681 INFO – Session 60d4e465-e4ff-4b97-8dab-c947313c1191 deleted due to client timeout 22:04:12.760 INFO – Session b4576ba5-f2b3-4c6b-bdd6-82dc4b06f1af deleted due to […]

docker上的RSelenium:文件在哪里下载?

我正在使用Docker镜像使用Selenium: require(RSelenium) if (length(system("docker ps -l", intern = TRUE))<2) try({system("docker run -d -p 4445:4444 selenium/standalone-firefox:2.53.0")}) 它的工作原理,我可以连接到任何url和导航。 但是,当我点击一个button来下载文件时,它有时会将其保存(部分保存为xxxxxxx.csv.part )到/tmp/mozilla_mozillaUser0 ,有时会保存到任何地方,或者可能找不到其他位置。 这是有原因吗? 另外我试图打开驱动程序使用 makeFirefoxProfile(list(browser.download.dir = "D:/temp")) 但它返回一个奇怪的错误 Error in file(tmpfile, "rb") : cannot open the connection In addition: Warning messages: 1: running command '"zip" -r9Xjq "C:\Users\rocks\AppData\Local\Temp\RtmpoPhjUb\file31076202d4f.zip" "C:\Users\rocks\AppData\Local\Temp\RtmpoPhjUb/firefoxprofile/prefs.js" ' had status 127 2: In file(tmpfile, "rb") : cannot […]