-1

I am trying to select the textbox of a popup:

Popup text box

 <textarea name="reporterRemarks" rows="5" 
onchange="javascript:document.itemActionForm.remarksUpdateFlag.value = 
'Y';document.itemActionForm.updateFlag.value = 'Y';" id="reporterRemarks" 
class="form-control fixed-width-font"></textarea>

I've tried:

webElem <- remDr$findElement("id", "reporterRemarks")
webElem <- remDr$findElement("name", "reporterRemarks")
webElem <- remDr$findElement("xpath", "//*[@id='reporterRemarks']")

All have been unsuccessful.

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
Earl Mascetti
  • 1,278
  • 3
  • 16
  • 31
Satori
  • 33
  • 4

1 Answers1

1

The popup was in an iframe therefore, I needed to switch frames in order to find elements that were on that popup.

webElems <- remDr$findElements("css", "iframe")
remDr$switchToFrame(webElems[[1]]
webElem <- remDr$findElement("name",'reporterRemarks')
Satori
  • 33
  • 4
  • 1
    Welcome to StackOverflow. Answers with only code in them tend to get flagged for deletion as they are "low quality". Please read the help section on answering questions then consider adding some commentary to your Answer. – Graham Mar 07 '18 at 02:46