How to use 'xpath' as locator?
bartonhammond opened this issue · 3 comments
bartonhammond commented
Is it possible to use xpath
expressions for like click
, or find
. I searched the docs and see only one result for xpath
.
aik099 commented
It's possible for find
:
$anchorsWithoutUrl = $page->findAll('xpath', '//a[not(@href)]');
Copied from http://mink.behat.org/en/latest/guides/traversing-pages.html?highlight=xpath .
stof commented
And click
is not looking for any element. It clicks on the element on which you call the method (so you need to use find
before it)
bartonhammond commented
Ok - thanks