I am new to Selenium and XPath. Can you please help me I identified the XPath correctly for the following structure:
<body>
<div id="body-wrapper">
<div id="outer-wrapper">
<div id="wrap2">
<div class="span-24">
<div style="clear: both;"/>
<div id="header-wrapper">
<div style="clear: both;"/>
<div class="span-24">
<div class="menu-secondary-container">
<ul class="menus menu-secondary">
<li>
<li>
<li class="">
<a class="sf-with-ul" href="#">
Automation
<span class="sf-sub-indicator">»</span>
<span class="sf-sub-indicator">»</span>
</a>
<ul class="children sub-menu" style="display: none; visibility: hidden;">
<li>
<a href="http://www.ufthelp.com/p/uft.html" title="UFT">UFT</a>
</li>
I have identified the XPath as:
("//div[@class='menutext']/descendant::ul[@class='children sub-menu']/a[@href='http://www.ufthelp.com/p/uft.html']"));
But I'm running into NoSuchElementException
. Please help me with the same. Thanks