xpath - Need to get all elements ending with specific text in selenium webdriver -
i have elements on page have xpath //*[@id='protect']/a, //*[@id='deezer']/a ,//*[@id='international']/a..i want xpaths in array list..all xpaths ending '/a'..but id different elements..please want elements in array list.so can click them using loops , conditions inside loop
there's straighforward way in selenium: using findelements. ex:
list list = driver.findelements(by.xpath("//a")); you'll every single hyperlink on page stored in list. you'll able handle every webelement in using loops.
Comments
Post a Comment