I got this error:
org.openqa.selenium.NoSuchElementException:
Timed out after 2 seconds. Element not found
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
My code snippets:
@Given("^(?:.*) is at the add new goal page$")
public void maryIsAtTheAddNewGoalPage() {
goalPage.addNewGoal();
}
In my pageObjects class
public class GoalPage extends PageObject {
public GoalPage(WebDriver driver) {
super(driver);
}
@iOSXCUITFindBy(accessibility = "btnAddNewGoal")
@AndroidFindBy(accessibility = "btnAddNewGoal")
private WebElement addNewGoalButton;
public WebElement getAddButton()
{
return addButton;
}
how can I inspect the element is visible or the page is loaded?