New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get pop up after uploading a file using AutoIt #330
Comments
Please provide a complete executable scenario to reproduce the issue instead of narrative description of the actions like "When I try to click on any product e.g "Business Card"" |
Hello Barancev , Thank you for considering this bug, please find the below steps to reproduce the bug
Expected Result: An Error popup should display for invalid files Note: Below code with xpath public static WebDriver openfirefox; @test(priority = 1) @test(priority = 2) @test(priority = 3) private void upload(String side) {
} |
I've executed the same scenario with Selenium, but uploaded a file by hands instead of AutoIt -- the error box appears. So the issue is related to your AutoIt script, not Selenium. |
Hi Barancev, Thank you so much, I got the issue it was related to AutoIt only. :) Thanks, |
Scenario: After uploading an invalid file (apart from image file) using AutoIt, pop up is not displaying. Uploading a proper file (any image file) works fine
Browser: Firefox 34.0.5
Selenium Library Version: selenium-server-standalone-2.42.2
Autoit: autoit-v3
Steps:
My Code is as below
public static WebDriver openfirefox;
@test(priority = 1)
public void openLink() {
openfirefox.get(https://www.psprint.com/);//Opens the URL
openfirefox.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);// Wait
}
@test(priority = 2)
public void upload() throws InterruptedException {
if(isElementPresent(By.id("fileupload_front1"))) {
upload("front");
}
}
private void upload(String side) {
WebElement error = openfirefox.findElement(By.xpath(Constant.CloseError));
if(side == "front"){
openfirefox.findElement(By.id("fileupload_front1")).click();// Clicks on Upload now button
Runtime.getRuntime().exec(Constant.UploadPath);
openfirefox.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
}
if(error.isDisplayed()) {
openfirefox.findElement(By.xpath(CloseError)).click();//Close the error window
}
}
The text was updated successfully, but these errors were encountered: