【发布时间】:2016-01-21 13:35:12
【问题描述】:
我在 Stockpair Website 上使用 Selenium
s = remoteDriver(remoteServerAddr = "localhost", port = 4444, browserName = "chrome")
s$open()
url <- "https://www.stockpair.com/sp#trading/page"
s$navigate(url)
dir <- s$findElement("css selector", "div.stockSelectionButton.left")
dir$clickElement()
我得到了错误
Error: Summary: StaleElementReference
Detail: An element command failed because the referenced element is no longer attached to the DOM.
class: org.openqa.selenium.StaleElementReferenceException
我研究过,如果 DOM 通过异步过程发生变化,就会发生这种情况。但是,我测试了运行 chrome.exe 可见的 Selenium,并且 DOM 没有改变,加载页面后元素仍然存在。
还有其他原因吗?
【问题讨论】:
标签: r selenium selenium-chromedriver rselenium