RSelenium无法访问DOM

RSelenium无法访问DOM,r,selenium,selenium-chromedriver,rselenium,R,Selenium,Selenium Chromedriver,Rselenium,我正在使用硒 我研究过,如果DOM通过异步进程改变,就会发生这种情况。但是,我使用运行chrome.exe visible的Selenium进行了测试,DOM没有改变,加载页面后th元素仍然存在 还有其他原因吗?这是一个动态网站,定期更新会改变DOM 通过JavaScript单击元素: 另见: 这是一个动态网站,定期更新会改变DOM 通过JavaScript单击元素: 另见: 谢谢,但通过您的代码,我得到错误:摘要:未知错误详细信息:处理命令时发生未知服务器端错误。类:org.openq

我正在使用硒

我研究过,如果DOM通过异步进程改变,就会发生这种情况。但是,我使用运行chrome.exe visible的Selenium进行了测试,DOM没有改变,加载页面后th元素仍然存在


还有其他原因吗?

这是一个动态网站,定期更新会改变DOM

通过JavaScript单击元素:

另见:


这是一个动态网站,定期更新会改变DOM

通过JavaScript单击元素:

另见:


谢谢,但通过您的代码,我得到错误:摘要:未知错误详细信息:处理命令时发生未知服务器端错误。类:org.openqa.selenium.remote.JsonException另外:共有28个警告(使用警告()查看它们)此功能:s$executeScript($('div.stockSelectionButton.left')。单击();“,args=list())@user670186 ah,忘记调用列表,请重新测试。谢谢。谢谢,但通过您的代码,我得到错误:摘要:未知错误详细信息:处理命令时发生未知服务器端错误。类:org.openqa.selenium.remote.JsonException另外:共有28个警告(使用警告()查看它们)此功能:s$executeScript($('div.stockSelectionButton.left')。单击();“,args=list())@user670186 ah,忘记调用列表,请重新测试。谢谢
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
s$executeScript("arguments[0].click();", list(dir))