How to detect a Mask-Overlay on any object
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to detect a Mask-Overlay on any object
Hello,
I'm running into some issues to detect a mask-overlay in an Angular app.
Issue: When I click a button 'Update', there's a process running to make updates, and till the time this process runs, there's a mask-overlay on the controls. At this time, click on controls(buttons underlying the overlay) wouldn't work, but the some of the properties of the button such as Enable, Exists and Visible are 'True'. I'm looking for ways to wait for the overlay to disappear before taking any other user actions. Any help would be appreciated!
Thank you
Abhi
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have something similar... it's a panel (DIV) in the HTML that is made visible when such a thing happens. We wrote a little bit of code to check to see if the panel is visible and, if it is, wait for it to go away.
function waitForLoading(timeout) { var loadingForm; var counter = 0; if ((timeout == undefined) || (timeout == null)) { timeout = 60; } Aliases.browser.panelLoading.RefreshMappingInfo(); Aliases.browser.panelLoading.WaitProperty('Visible', true, 5000); while ((Aliases.browser.panelLoading.Visible) && (counter < (timeout * 2))){ aqUtils.Delay(500, 'Waiting for loading panel to close'); counter++ } }
Obviously, the object itself is going to be different for you than for us so your Aliasing/Mapping would be different.... but this is what we do...
Generally speaking, you as the tester know when these such things should come up so you can add this detection code in to wait for it when you know it's expected.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
