Unable to locate element in a dropdown

  • <ul class="appt-dropdown-menu">
    <li id="service-slot-blocker" class="slot-blocker-holder">
    <li id="service-05b41399015375913">
    <code class="light-blue"></code>
    <span class="appt-details-dropdown-service-title">Facial</span>
    <span class="appt-details-dropdown-service-time">59mins</span>
    <div class="clearfix"></div>
    <li id="service-sebd91399015377146">

    I want to select dropdown value-Facial. I tried the below options for finding the element:


    WebElement s=driver.findElement(By.xpath("/html/body/div[2]/div[2]/div[1]/div[4]/div[3]/ul/li[2]/div[1]/ul/li[2]"));

    I am getting error as -element not visible

  • I am getting error as -element not visible: is the element visible? Selenium can't interact with invisible elements.

    If it is visible, you can do something like:


Suggested Topics

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