georgiana_e
georgiana_e

Reputation: 1869

check that a window is opened in RCPTT

I want to check if after some actions, a window is opened. The window name is "Help - Test". Below is my code:

with [get-window "Help - Test"] {
    get-property "isEnabled()" | equals true | verify-true
    get-property "isVisible()" | equals true | verify-true
}

when running the test I get error The Window "Help - Test" could not be found.

Also I tested the Eclipse help to check that the help menu is opened after Tips and Tricks and same problem: ec

Note: I want to check that the help menu from eclipse is opened.

Upvotes: 1

Views: 339

Answers (1)

Adam Horvath
Adam Horvath

Reputation: 1286

The expression

get-window "Help - Test"

is the test itself. No need for additional property getters. If RCPTT can not find the window then it is either not there (test case found a real problem) or it checks too early; before the window is rendered.

If the latter then things get a little complicated, you could wait or wait-until-eclipse-is-ready or place the action into a try section.

Upvotes: 1

Related Questions