0

I am trying to automate google login but I cannot proceed to the password field due to the error. I'm stuck after inputting the email address. The xPath is correct but I got that error.

Here is my code:

COMMONMETHODS PAGE:

public void waitForElementToBeVisible(WebElement element) {
        try {
            WebDriverWait wait = new WebDriverWait(driver, 60);
            wait.until(ExpectedConditions.visibilityOf(element));   
        }
        catch(Exception ex)
        {
            WebDriverWait wait = new WebDriverWait(driver, 60);
            wait.until(ExpectedConditions.visibilityOf(element));   
        }
    }

    public void waitForElementToBePresent(By locator) {
        WebDriverWait wait = new WebDriverWait(driver, 40);
        wait.until(ExpectedConditions.presenceOfElementLocated(locator));
    }

/**
     * This method find webelement in the dom
     * 
     * @param selectorScheme
     * @return WebElement
     */
public WebElement getElement(By selectorScheme) {
    return driver.findElement(selectorScheme);
}

```
LOGIN PAGE
 ```
@Step("Click Next button")
public GoogleLoginPage clickNextBtn() {
    commonMethods.waitForElementToBeVisible(googleLoginElements.getNextBtn());
    googleLoginElements.getNextBtn().click();
    return this;
}
```
ELEMENTS PAGE:
```
public WebElement getNextBtn() {
    return commonMethods.getElement(GoogleLoginSelectors.nextBtn);
}

```
SELECTORS PAGE:
```
public final static By nextBtn = By.xpath("//span[contains(text(),'Next')]");
ccnc
  • 1
  • 1
  • Does this answer your question? [Debugging "Element is not clickable at point" error](https://stackoverflow.com/questions/11908249/debugging-element-is-not-clickable-at-point-error) – Tomek Mar 10 '21 at 08:55

1 Answers1

0

Try with By.id("identifierNext") for locating Next button