简体   繁体   中英

check visibility of IE save dialog box using Selenium Web Driver

Currently, in my web application, I want to automatically save the generated excel reports on button click.

Issue:- I am not able to identify the visibility of IE save dialog box using Robot Class

Logic used to save IE file which is working successfully to save when alert is prompted

Robot robot = new Robot();
robot.setAutoDelay(5000);
Thread.sleep(3000);
robot.keyPress(KeyEvent.VK_ALT);
Thread.sleep(1000);
robot.keyPress(KeyEvent.VK_S);
robot.keyRelease(KeyEvent.VK_S);
robot.keyRelease(KeyEvent.VK_ALT);

How to check the visibility of save dialog box in IE 11 browser also in Firefox?

I checked this post for the solution but it's not working.

Robot class does not provide possibility to detect if dialog is visible or not. Just put appropriate delays and clicks on buttons.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM