QTP identifying the child tabs in a maintab like
tab_1,tab_2,tab_3,tab_4
while using a for loop for these tabs.its not proceeding
from _1 to _2.
How can i use "for loop "

Answers were Sorted based on User's Feedback



QTP identifying the child tabs in a maintab like tab_1,tab_2,tab_3,tab_4 while using a for loop ..

Answer / maniram

You can use regular expression in this case instead of using
"for loop"
Ex:
use any of these
tab_[0-9][0-9]
or
tab_ ..
or
tab_ .* will take any value

This should be set in the object properties.

Is This Answer Correct ?    1 Yes 1 No

QTP identifying the child tabs in a maintab like tab_1,tab_2,tab_3,tab_4 while using a for loop ..

Answer / amarendra kothuru

For example, If the Tabs are recogized in QTP as
Webelements, and the Tab name starts with "Tab_" and the
number changes then, the following loop may helpful for you.

for var_i = 1 to 4
Browsr("BrowserName").Page("Page").WebElement
("innertext:=tab_" & var_i).Click)
Wait 10
Next

I think so... This logic may help you....

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

I am trying to write a descriptive program for clicking on a perticular link.For that i wanted an index or location of that object.But when I viewing through spy, There was no index property of that object.What to do for getting index value.How can I get index? please any one let me know.

5 Answers  


What r steps to migrate from Manual testing to QTP?(IN BOTH WEB BASED AND WINDOWS APP)

1 Answers   Wipro,


What is the extension of QTP local Repository? If it is .mtr then what is .bdb extension stands for?

0 Answers  


how can we retrieve ten rows from the data table using loop concept?

4 Answers  


How can i store runtime value through vb script while using qtp

1 Answers  






how to write script in qtp(vbscript)..i mean with out application deployed..and how to call script1 into script2?

8 Answers   INCA, Infosys, Logix, SLK Software, Symphony, Wipro,


how to load vbs file to qtp through scripting. plz provide the code.....

2 Answers   IBM,


Got job with 3 years fake Experience

1 Answers   MNC,


What will be the test script in QTP to test a ComboBox where a user has to select more than two items????

8 Answers   L&T,


Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?

0 Answers  


What are the benefits of quick test pro(qtp)?

0 Answers  


why text area checkpoints cannot used for web applications

0 Answers  


Categories