0

Which locator to use to find the element yearbook? Tried using LinkText also including all other locators. Seems like not working

<a href="#" data-toggle="collapse" data-target="#menu-yearbooks" class="collapsed noRewrite" xpath="1">
    Yearbooks
    <i class="glyphicon glyphicon-chevron-up"></i>
    </a>
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
cshet
  • 23
  • 4

2 Answers2

0

use this xpath

//*[contains(text(),'Yearbooks')]
Waqar Nadir
  • 378
  • 2
  • 9
0

As per the HTML you can use only the following Locator Strategies:

  • LinkText:

    Yearbooks   
    
  • Xpath:

    "//a[@class='collapsed noRewrite' and contains(@data-target, 'menu-yearbooks')]"
    
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352