I want to disable the button before clicking on it, here is what I have:
<button type="submit" name="shippingAddress_save" value="Continue to Billing >" disabled="disabled">
I want to disable the button before clicking on it, here is what I have:
<button type="submit" name="shippingAddress_save" value="Continue to Billing >" disabled="disabled">
you can do this in selenium USING JavascriptExecutor as below:
WebElement yourButton= driver.findElement(By.name("shippingAddress_save"));
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("arguments[0].removeAttribute('disabled','disabled')",yourButton);
WebDriverWait wait = new WebDriverWait(driver, 20);
wait.until(ExpectedConditions.elementToBeClickable(yourButton));
yourButton.click();