Not able to click Logout Button eventhough able to identify the element in selenium webdriver



    • Environment : IE11
    • Webdriver/Selenium version : 3.141.59
    • Language : java

    Selenium code:

    driver.findElementByXPath("//span[contains(text(),'Logout')]").click();**
    

    HTML code :

    <span class="v-menubar-menuitem-caption">Logout </span>
    


  • Have a small correction in your Selenium code:

    driver.findElement(By.xpath("//span[contains(text(),'Logout')]")).click();



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2