Search code examples
javahtmlvisibilityrft

RFT: Problems testing window visibility


I am trying to confirm the visibility of a window on an HTML page using java. In every aspect of the window, it is passing even when not visible. Rational Function Tester can observe the objects of the window and I have used them to test the windows state. But in both cases(window showing/not showing) all the variables are the same. So .exists() always returns true and ensureObjectIsVisible().

What I would like to happen.

    if(//window is visible){
        button_yesbutton().click(); 
        System.out.print("Is Vis");
    }else{
        System.out.print("Not Vis");
    }

button_yesbutton().click(); always happens! RFT should crash with an exception that it could not find this object because the window is not on the screen, yet the mouse clicks in the top left corner of the browser and passes as though the window was visible.


Solution

  • What is the "Window" object that you are checking the visibility for? Is it browser(i.e html_HtmlBrowser()) ?