cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if specific tab of dialog is visible or no.

SOLVED
Highlighted
Contributor

How to know if specific tab of dialog is visible or no.

Hi,

 

In my test application sometimes tab of a particular dialog are hidden. 

I want to find out if particular tab is vissible or no, if yes activate it.

 

For example: there are 8 tabs , sometimes last 3 tabs are hidden. So how do I check if last tab is vissible or no.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: How to know if specific tab of dialog is visible or no.

Hi,

 

I assume that you are working with the desktop application.

First of all, you need to examine the dialog in the Object Browser in TestComplete and figure out how every tab can be reliably and uniquely identified. This depends on your tested application.

Then in your test code you must use relevant .FindXXX() method and search for the tab that you need. If the tab is found (.Exists property equals to True), you might need to check additionally if the found tab is visible by checking if  the .Visible property equals to True or do some other check that must succeed if the tab is visible on the screen. Again, the exact check is specific to your given application.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

1 REPLY 1
Highlighted
Community Hero

Re: How to know if specific tab of dialog is visible or no.

Hi,

 

I assume that you are working with the desktop application.

First of all, you need to examine the dialog in the Object Browser in TestComplete and figure out how every tab can be reliably and uniquely identified. This depends on your tested application.

Then in your test code you must use relevant .FindXXX() method and search for the tab that you need. If the tab is found (.Exists property equals to True), you might need to check additionally if the found tab is visible by checking if  the .Visible property equals to True or do some other check that must succeed if the tab is visible on the screen. Again, the exact check is specific to your given application.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
A new challenge is here!

Create a function to drag one element to another for the TechCorner tag!

Will you dare to take the challenge?


Scripts created in July:
- Passing custom command-line arguments as a test parameter
Top Kudoed Authors