I am currently facing an issue with automating the PayPal login page using a page object. Despite my efforts, I am unable to click on the Log In button on the page.
Here is how the PayPal login page looks:
https://i.sstatic.net/9RdvO.png
This is my current representation of the PayPal login page in the page object:
public class PayPalLoginPage extends DesktopPage {
private static final Logger LOG = LoggerFactory.getLogger(PayPalLoginPage.class);
@FindBy(id = "email")
private WebElement emailInput;
@FindBy(id = "password")
private WebElement passwordInput;
@FindBy(id = "btnLogin")
private WebElement loginButton;
//more code
}
I have tried various methods but seem to be encountering errors like
no such element: Unable to locate element: {"method":"id","selector":"btnLogin"}
Even using webElement.sendKeys(String keys)
results in
org.openqa.selenium.ElementNotVisibleException: element not visible
. Waiting for the element visibility times out and JavaScript interactions are also failing.
If anyone has any insights or suggestions, it would be greatly appreciated. Thank you.