Skip to main content

You can also use it with Page Object Pattern, e.g:

@FindBy(xpath = "//*[contains(text(), 'Best Choice')]")Try this code:

WebElement buttonBestChoice;

@FindBy(xpath = "//*[contains(text(), 'Best Choice')]") WebElement buttonBestChoice; 

You can also use it with Page Object Pattern, e.g:

@FindBy(xpath = "//*[contains(text(), 'Best Choice')]")

WebElement buttonBestChoice;

You can also use it with Page Object Pattern, e.g:

Try this code:

@FindBy(xpath = "//*[contains(text(), 'Best Choice')]") WebElement buttonBestChoice; 
Source Link

You can also use it with Page Object Pattern, e.g:

@FindBy(xpath = "//*[contains(text(), 'Best Choice')]")

WebElement buttonBestChoice;