-1
  <li class="rktpage">
drop a Conmerce
<ul style="visibility: hidden;">
<li class="">
<a href="/dom_config/ui/loc/insert">rtw By user</a>
</li>

I am facing difficulty to identify “rtw By user” href element which is under “drop a Conmerce” tab

Mukesh Takhtani
  • 852
  • 5
  • 15
mike
  • 1
  • Possible duplicate of [How to click on hidden element in Selenium WebDriver?](http://stackoverflow.com/questions/22110282/how-to-click-on-hidden-element-in-selenium-webdriver) – Dzianis Yafimau Jan 10 '16 at 18:16
  • http://stackoverflow.com/questions/22110282/how-to-click-on-hidden-element-in-selenium-webdriver - is it your problem? – Dzianis Yafimau Jan 10 '16 at 18:17
  • Hi, by using driver/webdriver you can't interact with hidden elements. you need to use javascript executor to interact with hidden elements. please look into links provided above. – murali selenium Jan 11 '16 at 06:07

1 Answers1

0

To find text

 driver.findElements(By.tagName("li")).get(index_of_li_tag).getText();

To find href attribute value

driver.findElement(By.id("li")).get(index_of_li_tag).getAttribute("href");
yojna
  • 503
  • 1
  • 5
  • 17