1

I ma trying to find element using RSelenium

remDr <- remoteDriver(remoteServerAddr = "192.168.99.100", port = 4445L,
                      browserName = "chrome")
remDr$open()
url <- "https://sudskapraksa.csp.vsrh.hr/decisionPdf?id=090216ba8084ca52"
remDr$navigate(url)

There is a captcha image (if you don't see it try to execute navigate part 10 times) I tried to select using:

  captcha_element <- remDr$findElement(using = "css selector", "img[id='captchaImg']")$clickElement()
  captcha_element <- remDr$findElement(using = "id", "captchaImg")$clickElement()
  captcha_element <- remDr$findElement(using = "xpath", "//*[@id='captchaIm']")$clickElement()

but it always return an error.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Mislav
  • 1,533
  • 16
  • 37

1 Answers1

1

As per your code trials and subsequent comment update to identify the captcha image you can use the following Locator Strategy but of-coarse you can't invoke the click event as none of the element attributes contain any such event :

captcha_element <- remDr$findElement(using = "css selector", "img#captchaImg")
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352