java - Selenium @FindBy find by one xpath or another -
i'm trying find element on page using
@findby(xpath = "somexpath") webelement someelement;
the problem element's xpath different (because of failed login message displayed in same table). how can find element 1 xpath or another?
xpath == "somexpath1" || xpath == "somepath2"
i've tried doing repeating annotation, this:
@findby(xpath = "somexpath1") @findby(xpath = "somexpath2") webelement someelement
but won't compile. , i've tried using @findbys seems work && rather ||.
any help appreciated. thanks!
several paths can combined |
separator, works logical or.
@findby(xpath = "somexpath1 | somexpath2")
java selenium
No comments:
Post a Comment