Need help on below to click() i can't click on the Button 'Connexion'. I can locate element in Chrome devtool but my program still fails.
Button HTML :
<button class="btn btn-lg hoverableButton ng-scope" translate="LOGIN" ng-disabled="authenticationCtrl.disableMageConnectButton()" ng-click="onSubmit()">Connexion</button>
I have tried with below code
By button = By.xpath("//button[@class='btn btn-lg hoverableButton ng-scope' and contains(@ng-click, 'authenticationCtrl.onSubmitMage()')]");
WebDriverWait wait = new WebDriverWait(webdriver, 15);
wait.until(ExpectedConditions.elementToBeClickable(button));
webdriver.findElement(button).click();
The error Message :
Expected condition failed: waiting for element to be clickable: By.xpath: //button[@class='btn btn-lg hoverableButton ng-scope' and contains(@ng-click, 'authenticationCtrl.onSubmitMage()')] (tried for 15 second(s) with 500 milliseconds interval)
and
no such element: Unable to locate element: {"method":"xpath","selector":"//button[@class='btn btn-lg hoverableButton ng-scope' and contains(@ng-click, 'authenticationCtrl.onSubmitMage()')]"}
I tested the xpath on devtools and xpath and it found the button.
Thanks.
iframe