How to pick an element with the same properties on a page?

Asked

Viewed 549 times

0

I’m wondering how to get an element of the kind that repeats itself inside the same page. I tried using the following Xpath’s that were validated on Firepath, but I was unsuccessful when I ran my tests through Selenium.

   //div[@id='selectGenericMult']/child::div/child::input']

   (.//*[@id='selectGenericMult']/child::div/child::input)[last()]

The tag data they’re trying to get is this:

   <input class="ui-select-search input-xs ng-pristine ng-valid ng-touched" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Selecione" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-click="$select.activate()" ng-model="$select.search" role="combobox" aria-label="Select box" ondrop="return false;" style="width: 1331px;" type="text"/>
  • I couldn’t add the full tag.

  • The question has been answered in the English version of stackoverflow (https://stackoverflow.com/questions/45593719/how-to-find-two-different-elements-but-with-same-information-using-xpath)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.