0

Unable to click and the error is:

org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//span[text()='prpse1']"}

HTML:

<span class="lbl ui_lbl_radio custom-control-description">Business</span>
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Anand
  • 19
  • 1

2 Answers2

0

To click on the element with text as Business you can use the following Locator Strategy:

  • xpath:

    //span[@class='lbl ui_lbl_radio custom-control-description' and text()='Business']
    
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
0

To click on the element you can use CSS selector approach as below:

driver.findElement(By.cssSelector("span.lbl ui_lbl_radio custom-control-description")).click();

Bhavesh Soni
  • 188
  • 8