Hi..friends can anybody write the script for this question...
Am having some 20 nos of links in a web application, i want
to click some 5,13 & 17th links. So please....can anybody
give the answer....???

-->Hani<--

Answers were Sorted based on User's Feedback



Hi..friends can anybody write the script for this question... Am having some 20 nos of links in a w..

Answer / ashok kumar

Set obj_Link = Description.Create()
obj_Link("micclass").value = "Link"
Set it_Link =
Browser("micclass:=Browser").Page("micclass:=Page").ChildObjects(obj_Link)
For i = 0 to it_Link.count-1 step 2

it_Link(i).Click 'it click +2,4,6....

Next

Is This Answer Correct ?    5 Yes 1 No

Hi..friends can anybody write the script for this question... Am having some 20 nos of links in a w..

Answer / sss

thats ok
but we must use index other wise it will not work

Is This Answer Correct ?    1 Yes 0 No

Hi..friends can anybody write the script for this question... Am having some 20 nos of links in a w..

Answer / srikanthdas

Set obj = Description.Create()
obj("micclass").value = "Link"
Set x =Browser("micclass:=Browser").Page("micclass:=Page").ChildObjects(obj)
for x= 1 to x.count
if x(i)=5 OR 13 OR 17 Then
x(i).Click
end if
Next

Is This Answer Correct ?    0 Yes 0 No

Hi..friends can anybody write the script for this question... Am having some 20 nos of links in a w..

Answer / srikanth

Set obj = Description.Create()
obj("micclass").value = "Link"
Set x=
Browser("micclass:=Browser").Page("micclass:=Page").ChildObjects(obj)
msgbox x.count
for i=0 to x.count-1
if x(i)= 5 OR 13 OR 17 Then
x(i).Click
end if
Next

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

Can any one tell me Difference between Keyword Driven Frame work and Hybrid framework? Its Urgent.

2 Answers   IBM, Wipro,


one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.

0 Answers   Mindlance,


hai friends i'm learning qtp now where we r using only record &playback frame work.and people r saying in realtime they won't use this frame work. if so what frame work actually using in realtime .and could you give explanation comaparing the record &play back fm and what ever FWyou r using in your organization. hoping cool response. thanx in advance

3 Answers  


For ex we are doing automate testing in that can we do some part of application recording, some part descriptive programing and some part general VB scripting like that .............

3 Answers   Satyam,


What do you mean by checkpoints in qtp?

0 Answers  






I am verifying the actual vs the input value to make sure that they been entered correctly. In the Global Sheet I have a column called Customer with the multiple names in each row and now I am trying to capture the value during runtime under the column name Customer_in_Apps. Somewhat it works but during runtime the values are being stored in each column vs each row i.e., Customer_in_Apps, Customer_in_Apps1. Automatically it add columns instead of rows. row=datatable.getsheet("Global").GetRowCount for x=1 to row datatable.getsheet("Global").SetCurrentRow(x) Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Val1=Datatable.Value("Customer",dtGlobalSheet) Val2 = Datatable.GlobalSheet.AddParameter("Customer_in _Apps",runtimevalue) If (trim(Val2)=trim(Val1)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Val1&vbcrlf& "Customer Value: " &_Val2 else Reporter.ReportEvent micFail, "Customer validation unsuccessful", "Actual Value: " &Val1&vbcrlf& "Customer Value: " &Val2 End If Next

3 Answers  


what is the difference btn risks & Therads in the Test plan documentation?

0 Answers   Accenture,


Which method do you use to retrieve data from the WebList object?

1 Answers  


What is the exact difference bet function and action in QTP Anybody can explain it in detail..Thanks in advance..

12 Answers   Wipro,


What is the difference between check point and output value.

5 Answers  


how to connect qtp to sqlserver?(if any body know about this please send mail to me:sheik_feroz5@yahoo.com)thank u

3 Answers   Honeywell,


I want to capture data(using keyword) from msdos application using QTP?... Below is little work i could do on it... /* Set app=CreateObject("Wscript.shell") SystemUtil.run ("C:\Users\Agent\Desktop\pumpsim\PUMPSIM.EXE") Window(“PUMPSIM.EXE”).Activate wait(3) app.sendkeys "N" */ Thanks in advance...!!!

0 Answers  


Categories