Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Closing intermittent startup popups without generating errors?((is there a way to tell if there's a window other than "get-window"?))
Closing intermittent startup popups without generating errors? [message #1754338] Thu, 16 February 2017 13:44 Go to next message
Victor Dulepov is currently offline Victor DulepovFriend
Messages: 5
Registered: December 2014
Junior Member
My AUT from time to time throws a couple of modal windows at startup (like, prompts to download new data or updated help/tutorials). They may or may not appear during any specific launch - it's out of our immediate control (checks external URLs for changes).

I can get those windows using get-window by name, and then click Cancel or whatever, that's totally fine.

However, when those windows are NOT popping up, those unsatisfied get-window steps/cases generate errors in my suite run.

Question: is there a way to check whether some window is present in the AUT other then get-window? Something that would not throw an ERROR upon NOT finding that specific window.

Maybe, something usable as a condition for an if clause, like
if [window-present "New Tutorials"] {
get-window "New Tutorials" |  get-button Cancel | click
}

(there's no such function Confused - am I wrong?)

If not - is there a way to forcefully set a testcase result to Passed - or to ignore those "service/prepare ground" test-cases" at all, or to mask/ignore the error appearing when get-window does not find the window?


PS - freezing context immediately after closing those windows and then reusing it does not look like an option - a clean workspace is always required.
Re: Closing intermittent startup popups without generating errors? [message #1754371 is a reply to message #1754338] Fri, 17 February 2017 01:24 Go to previous messageGo to next message
Ulyana Skorokhodova is currently offline Ulyana SkorokhodovaFriend
Messages: 280
Registered: July 2014
Senior Member
Hi Victor,

You can use try{} ECL command with an empty catch{}, i.e.:

    try -times 5 -delay 100 -command {
    	    get-window "New Tutorials" |  get-button Cancel | click
     } -catch{}


So if "New Tutorials" window appears your test will execute the code inside try block, if there is no window, the test will continue with no failure.

Kind regards,
Ulyana.
Re: Closing intermittent startup popups without generating errors? [message #1754397 is a reply to message #1754371] Fri, 17 February 2017 08:53 Go to previous messageGo to next message
Victor Dulepov is currently offline Victor DulepovFriend
Messages: 5
Registered: December 2014
Junior Member
Thanks Ulyana,
worked like a charm Smile
Re: Closing intermittent startup popups without generating errors? [message #1754398 is a reply to message #1754371] Fri, 17 February 2017 08:54 Go to previous message
Victor Dulepov is currently offline Victor DulepovFriend
Messages: 5
Registered: December 2014
Junior Member
Thanks Ulyana,
worked like a charm Smile
Previous Topic:Can I capture the error marker in RCPTT?
Next Topic:Test report dont show test suite name.
Goto Forum:
  


Current Time: Sat Aug 18 20:00:14 GMT 2018

Powered by FUDForum. Page generated in 0.02093 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top