data-ng-disabled="disableUpload"
How to work with such attribute?
I will elaborate more on this,
I want to upload a file by clicking on the + icon near add file button, but the below code says its disabled.
The code snippet is
I gave the xpath as below but nothing is working out .Please assist
@FindBy(xpath="//button[@id='createMoreButtonAs22'][@data-ng-disabled='disableUpload']")
or
@FindBy(xpath="//*[@id='createMoreButtonAs22']/i")
function
public void addFiles() throws InterruptedException {
WebDriverWait wait = new WebDriverWait(driver, 60);
wait.until(ExpectedConditions.elementToBeClickable(addfilebtn));
boolean flag = addfilebtn.isEnabled();
if (flag) {
((JavascriptExecutor) driver).executeScript("arguments[0].click();", addfilebtn);
System.out.println("After clicking");
} else
System.out.println("Element cannot be clickable");
}
}
but still not working. How to click the button so that file can be uploaded?