0

I am trying to use Seleno (and therefore Selenium) to do some UI testing in my project.

In my rendered page is the following link

<div class="col-md-10">
  <a class="btn btn-md btn-default btn-success col-md-4 col-sm-5 col-xs-12" href="XXXXXX" id="btnInternal">Secured User</a>
</div>

However, when I call

var userLink = By.PartialLinkText("Secured User");
return Navigate.To<UserDashboard>(userLink);

it does not work (I started with By.LinkText, and that didn't work, so I thought PartialLinkText might be more forgiving)

In either case, I end up with the NoSuchElementException

I can't use the CSS or other selectors AFAIK, because there are many other links on the page using the same styling.

Jason Coyne
  • 6,509
  • 8
  • 40
  • 70
  • 1
    `NoSuchElementException` usually means the object is 1. contained within a `` or ` – Richard Mar 27 '15 at 21:52
  • Its not using a frame, and the page is pretty static and I can see it on the page during the test run. I think its something about the nesting of the various elements on the page causing confusion in the selenium selector – Jason Coyne Mar 30 '15 at 13:36
  • I couldn't get it to work with the byLink text, but I was able to get it with an XPath query. – Jason Coyne Mar 30 '15 at 22:11

0 Answers0