Forum Discussion

Sadeesh's avatar
Sadeesh
New Contributor
4 years ago

How to to click an element/button where only if it is visible

I'm new to test complete and I need to know how to click an element/button where only if it is visible. I see there are no built-in keywords available for the same. Seems to need to achieve this with the condition strategy. Kindly advise.

  • Are you asking for a way to do it from a keyword test? You will need to use the If... Then operation, and you can set the condition to be a code expression. The expression would be something like:
    Aliases.App.Window.Button.Visible

     

    It is much easier to do it in scripting however.

  • tphillips's avatar
    tphillips
    Frequent Contributor

    Are you asking for a way to do it from a keyword test? You will need to use the If... Then operation, and you can set the condition to be a code expression. The expression would be something like:
    Aliases.App.Window.Button.Visible

     

    It is much easier to do it in scripting however.