Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Explain the difference between check point and output value?

0 Answers  


What the differences are and best practical application of each.

1 Answers  


how u write vb script in qtp pls give me some basic script and some material

32 Answers   Datamatics, UHG, Winit,


what is aregular expression?

4 Answers   UHG,


write code to read and write data from file?

1 Answers   IBM,






Expalin Text/Text Area Checkpoint

1 Answers   Crea,


Dis advantages of XML checkpoint ?

0 Answers   Sapient,


Create flight reservation login descriptive programing (Condition: Remove the value and substitute with a variable, and then call the validation from Excel) Plz help me....... very urgent.........

0 Answers  


What is diffrence between Global variables and Environment variables...Anybody can give me answer..Thanks in advance..

3 Answers   IBM,


what r the main attributes of test automation?

0 Answers  


Hi Everybody, Can anybody please tell me the how to display the result of the QTP in the notepad text file rather than in the QTP result window. Suppose this is my simple script:WHich will open the notepad file and enter some text and then will change the font then will calculate how much time has been taken.Now, in this script i want to display the result in notepad file. Dim s Dim starttimer,endtimer,timeit s="uyetuywqtywqte" SystemUtil.Run "notepad","","Y:\","" Window("Notepad").WinEditor("Edit").Type micCtrlDwn + "s" + micCtrlUp Window("Notepad").Dialog("Save As").WinEdit("File name:").Set "test1" Window("Notepad").Dialog("Save As").WinEdit("File name:").Type micReturn Window("Notepad_3").Type s Window("Notepad_3").WinEditor("Edit").Type micCtrlDwn + "s" + micCtrlUp starttimer=timer Window("Notepad_3").WinMenu("Menu").Select "Format;Font..." Window("Notepad_3").Dialog("Font").WinEdit ("Font:").Type "cou" + micDwn Window("Notepad_3").Dialog("Font").WinComboBox ("Font:").Select "Courier" Window("Notepad_3").Dialog("Font").WinEdit ("Font:").Set "Courier" Window("Notepad_3").Dialog("Font").WinEdit("Font:").Type micReturn endtimer=timer timeit=endtimer-starttimer print(timeit) Please also tell me where the function for the text file result will be declared and where it should be called. Thanks, Gaytri

2 Answers  


Plz explain about Virtual object? What is the situation u r using , explain with example?

1 Answers  






Categories