我希望Rselenium在登录时输入电子邮件和密码。我设法打开了一个chrome,导航到登录站点并单击正确的元素以打开登录弹出窗口。此后,虽然我找到了向登录字段输入文本的正确ID,但RSelenium无法识别webelement。
#Add RSelnium to my library
library(RSelenium)
#start a server
rD <- rsDriver(port = 4567L, browser = "chrome")
#get into the client
driver = rD[["client"]]
#get to google
driver$navigate("http://www.google.com")
#reset all cookies first
driver$deleteAllCookies()
#get to tripadvisor
driver$navigate("http://www.tripadvisor.com")
#log in
webele <- driver$findElement(using = "class name","login-button")
webele$clickElement()
#At this point I need to use the find driver$findElements to find the email id "regSignIn.email" however I get this error #Add RSelnium to my library
library(RSelenium)
#start a server
rD <- rsDriver(port = 4567L, browser = "chrome")
#get into the client
driver = rD[["client"]]
#get to google
driver$navigate("http://www.google.com")
#reset all cookies first
driver$deleteAllCookies()
#get to tripadvisor
driver$navigate("http://www.tripadvisor.com")
#log in
webele <- driver$findElement(using = "class name","login-button")
webele$clickElement()
#Add RSelnium to my library
library(RSelenium)
#start a server
rD <- rsDriver(port = 4567L, browser = "chrome")
#get into the client
driver = rD[["client"]]
#get to google
driver$navigate("http://www.google.com")
#reset all cookies first
driver$deleteAllCookies()
#get to tripadvisor
driver$navigate("http://www.tripadvisor.com")
#log in
webele <- driver$findElement(using = "class name","login-button")
webele$clickElement()
#now from the pop up I want to input the email address and password,
#however, I cannot find the webelement