Forum Discussion
The implementation for Chrome and IE differ somewhat, but you could look at using UIAObjects. I have implemented this previously for downloading files in IE following a similar question finding downloaded files:
Redacted code:
var frameObj = Aliases.browser.BrowserWindow.WaitWindow("Frame Notification Bar"); var UIANotificationObj = frameObj.UIAObject("Notification"); var objectName = "Save"; //Or whatever the button you are looking to click var UIAfindObj = UIANotificationObj.UIAObject(objectName); UIAfindObj.Click();
Of course you may need to map one or two objects. And definately add some waits, checks, retries, refreshmappinginfo(s) to make sure it doesn't fall over, but basically you wait for the notification bar with the save/open/save as buttons and click it
Also, if you know exactly what your file is going to be called, you could look at:
https://support.smartbear.com/viewarticle/8999/
Haven't tried this myself though...
- vthomeschoolmom5 years agoSuper Contributor
var frameObj = Aliases.browser.BrowserWindow.WaitWindow("Frame Notification Bar");
This makes me think a Desktop testing license is required. WaitWindow is not one of my options for a browser window. Am I thinking wrong?
- tristaanogre5 years agoEsteemed Contributor
No, I think you're correct. The reason being is that you're interacting directly with the browser application rather than the web application the browser is serving up... The browser is a Desktop application and, while you're not TESTING it, you do need to interact with it.
- RUDOLF_BOTHMA5 years agoCommunity Hero
Hmm,
My organisation has Web and desktop floating licences, so that might be the difference, but my tests don't use a desktop licence and still work.
Related Content
Recent Discussions
- 9 hours agoSvetaG