【发布时间】:2016-10-16 18:38:32
【问题描述】:
我正在尝试运行此代码:
library(RSelenium)
pJS<- phantom()
remDr <- remoteDriver(browserName = "phantomjs")
url<- "http://www.magicbricks.com/property-for-rent/residential-real-estate?proptype=Multistorey-Apartment,Builder-Floor-Apartment,Penthouse,Studio-Apartment,Service-Apartment,Residential-House,Villa&cityName=Mumbai"
remDr$open()
remDr$navigate(url)
webElem1 <- remDr$findElement("name", ">5 BHK")
webElem2 <- remDr$findElement("css", "#refinebedrooms li:nth-child(6)")
webElem3 <- remDr$findElement("css", "#viewMoreButton a")
但我不断收到以下错误:
错误:摘要:NoSuchElement 详细信息:使用给定的搜索参数无法在页面上找到元素。 类:org.openqa.selenium.NoSuchElementException 更多细节:运行errorDetails方法
这是什么意思?我该如何克服它?我是 R 的新手,也是 RSelenium 的第一次用户,所以任何形式的帮助都将不胜感激? TIA
【问题讨论】: