Elen Elen - 1 year ago 266
R Question

Selenium no such element found

I try to take the href from an element using RSelenium.

Here is an example of html structure:

<ol id="rem">
<div class="bare">
<a class="tlt mhead" href="https://www.myexample.com">

I use this:

pro<-remDr$findElement(using = 'xpath', "//*/input[@class = 'bare']")

but it can't find the element and returns this error:

Error: Summary: NoSuchElement
Detail: An element could not be located on the page using the given search parameters.
class: org.openqa.selenium.NoSuchElementException

What can I do?

Answer Source

Not the input element has the bare class, the div (assuming dib is a typo):

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download