Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to validate Tab names and child tab names in QTP
#1
Solved: 10 Years, 9 Months, 2 Weeks ago
Hi,
I want to validate tab

Scenario:
1. After launching my application, it should foucs to some (eg.Summary) tab name and child tab name (eg.Data Summary)

2. I want to validate whether these two tabs (Summary and Data Summary) are focused or not?

3. How get tab name (eg. Summary) on which property i have to used to get name.

I will appreciate your help,
Kindly advise...


Attached Files Image(s)
   
Reply
#2
Solved: 10 Years, 9 Months, 2 Weeks ago
Hi Sekhar,

You can make use of "selection" property of Tab control. It retains the name of the Tab that is currently selected.

In your application, there are two Tab controls i.e parent and child. After lunching your application retrieve the value of the "selection" property for both the Tab controls and check if they are the expected ones (i.e. Summary and Data Summary) or not.

Hope it will help you..
Reply
#3
Solved: 10 Years, 9 Months, 2 Weeks ago
Hi PrabhatN, thanks for your great reply and i am new to QTP, as per your reply how to get value of the "selection". If you dont mind can you please explain in details.

I am providing script to you for better understanding. I am trying GetProperty with different values as given below. Please correct me if i am doing wrong?

Code:
SwfWindow("Lilly Science Grid").SwfTab("LSB_OCT_Workspace").Select "Summary"   // Focus

sumTabName = SwfWindow("Lilly Science Grid").SwfTab("LSB_OCT_Workspace").GetROProperty("name")  
msgbox sumTabName   -- i am getting output like that this name :"LSB_OCT_Workspace"

sumTabName1 = SwfWindow("Lilly Science Grid").SwfTab("LSB_OCT_Workspace").GetROProperty("value")
msgbox sumTabName2   -- i am getting output like blank message box.

sumTabName2 = SwfWindow("Lilly Science Grid").SwfTab("LSB_OCT_Workspace").GetROProperty("text")
msgbox sumTabName1   -- i am getting output like blank message box.
Chandra Sekhar
Reply
#4
Solved: 10 Years, 9 Months, 2 Weeks ago
Hi Sekhar,

Try this,
Code:
SwfWindow("Lilly Science Grid").SwfTab("LSB_OCT_Workspace").Select "Summary"

getSelTab = SwfWindow("Lilly Science Grid").SwfTab("LSB_OCT_Workspace").GetROProperty("selection")

Now getSelTab will have the name of the Tab i.e. currently selected

Actually I tried this with Windows application and it worked. Hope it works with your application too.
Reply
#5
Solved: 10 Years, 9 Months, 2 Weeks ago
Hi Prabhat,
I tried as per you, it was working and able to get root and child tab names.
I really appreciate your help and also thankful to this fourm providing such a great support.
Sekhar
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT issues with Outsystems dynamically generated Id/names jherron 2 1,132 03-02-2020, 09:33 PM
Last Post: Swishy70
  SwfTreeview - Color validation for child item YogeshCallappa 0 2,082 11-10-2016, 04:55 PM
Last Post: YogeshCallappa
  Driver Script to control child scripts sumanhyd 1 2,982 07-26-2016, 07:06 PM
Last Post: Ankesh
  How to validate mandatory filed (*) in web application using balak89 1 3,968 09-13-2015, 12:54 AM
Last Post: ADITI1992
  UFT 12.50 unable to recognize child objects from a Dialog Class in Firefox jesusisaac 1 3,596 08-20-2015, 11:39 PM
Last Post: ADITI1992

Forum Jump:


Users browsing this thread: 1 Guest(s)