我正在尝试选择弹出窗口的文本框:
webElem <- remDr$findElement("id", "reporterRemarks")
webElem <- remDr$findElement("name", "reporterRemarks")
webElem <- remDr$findElement("xpath", "//*[@id='reporterRemarks']")
我试过了:
Error: Summary: NoSuchElement
Detail: An element could not be located on the page using the given search parameters.
class: org.openqa.selenium.NoSuchElementException
Further Details: run errorDetails method
一切都没有成功。
{{1}}
答案 0 :(得分:0)
弹出窗口在iframe中,因此我需要切换帧以查找弹出窗口中的元素。
webElems <- remDr$findElements("css", "iframe")
remDr$switchToFrame(webElems[[1]]
webElem <- remDr$findElement("name",'reporterRemarks')