ropensci / RSelenium

An R client for Selenium Remote WebDriver
https://docs.ropensci.org/RSelenium
343 stars 81 forks source link

Selenium judge whether the element exists #235

Closed Liripo closed 3 years ago

Liripo commented 4 years ago

Hello: How can I tell if an element exists or not will not stop my script directly? Thanks!

taiyodayo commented 3 years ago

I use try() and tryCatch() like this:

try(remDr$findElement(using="name", value = 'login_id'))