Monday, May 14, 2012

Unable to select menu item using xpath [Validates in Xpath checker, but webdriver cannot find it]

I am trying to select a menu item...though xpath validates well in Xpath checker, it does not work from WebDriver ...can someone help?



I get Unable to locate element: {"method":"xpath","selector":"//a[contains(text(),'Start Loan Process')]"}



HMTL looks something like this
<div class="bd">
<ul class="first-of-type">
<li id="yui-gen7" class="yuimenuitem first-of-type" groupindex="0" index="0">
<li id="yui-gen8" class="yuimenuitem" groupindex="0" index="1">
<li id="yui-gen9" class="yuimenuitem" groupindex="0" index="2">
<li id="yui-gen10" class="yuimenuitem" groupindex="0" index="3">
<li id="yui-gen11" class="yuimenuitem" groupindex="0" index="4">
<a class="yuimenuitemlabel" href="#">Start Loan Process</a>




No comments:

Post a Comment