I am currently learning page object model (POM) and I am trying to access a specific web element using @FindBy but I am not sure how to correctly write the syntax for my element into @FindBy?
What I have is:
driver.findElement(By.cssSelector("a[dta-qid='inventory']");
So my question is how do I place a[da-qid='inventory']
correctly into @FindBy?
By, a[da-qid='inventory']
, what I mean is that it selects every <a>
element whose da-qid
value begins with 'inventory'
.