I have two buttons("Continue registration") which are identical on two different pages The first one is
<input type="submit" class="button" value="Continue registration">
and the second one is
<a id="confirm-button" href="#" onclick="onSubmit()" class="submit button">Continue registration</a>
I am looking for a way to target both of those elements with one Xpath
Currently I have a solution which works by mapping each of them to one element like this
[SelectByXPath("//input[@value='Continue registration']")]
public Button Continue { get; }
[SelectByXPath("//*[@id='confirm-button']")]
public Button ContinueWithId { get; }
I can also map the first one by cssSelector and the second one by Id which works perfectly, but ideally I would like to have something like this
[SelectByXPath("//input[@value='Continue registration'] and *[@id='confirm-button']")]
public Button Continue { get; }
which basically says find this element by value or by Id whichever is present on the page.