i am giving.multiple names like ram,raj,san etc....pls enter & search these names in google pade edit box through script...
i told to interviewer, using Ms excel & test easily..but interviwer not happy with that answer?

Answers were Sorted based on User's Feedback



i am giving.multiple names like ram,raj,san etc....pls enter & search these names in google pade..

Answer / manjunathareddy

SystemUtil.Run "iexplore.exe","www.google.com"

Arr=Array("ram","raj","san")

For i=LBound(Arr) to UBound(Arr)
Browser("name:=Google").Page("title:=Google").WebEdit("name:=q").Set Arr(i)
Browser("name:=Google").Page("title:=Google").WebButton("name:=Google Search","type:=button").Click
Browser("name:=.*").Close
Next

Is This Answer Correct ?    3 Yes 0 No

i am giving.multiple names like ram,raj,san etc....pls enter & search these names in google pade..

Answer / mithuna reddy

Hi Manjunath, done some modifications to your script
please let me know if it is wrong after the first iteration of For loop when the browser object is close the second iteration would throw an error, so I have put SystemUtil in For loop

Arr=Array("ram","raj","san")

For i=LBound(Arr) to UBound(Arr)
SystemUtil.Run "iexplore.exe","www.google.com"
Browser("name:=Google").Page("title:=Google").WebEdit("name:=q").Set Arr(i)
Browser("name:=Google").Page("title:=Google").WebButton("name:=Google Search","type:=button").Click
Browser("name:=.*").Close
Next

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More QTP Interview Questions

what difference between client and server applications exatly?

1 Answers   Honeywell,


If i entered 2 columns and 4 rows inputs in DDT Like Mango fruit, Banana Fruit, Brinjal Veget, Carrot Veget.. . My Q is How to get the 2nd column value for corresponding 1 column input in 3rd row ie, ( i need to get "veget" in messge box @ run time

5 Answers   CTS,


What is test object model in quicktest professional (qtp)?

0 Answers  


How u will do versioning in QTP?

0 Answers   NIIT,


Will QTP Support Visual Foxpro Applications? If yes please tell me whether I need to install any additional addins for that?

0 Answers  






How smart identification works in qtp ?

0 Answers  


can anyone please tell me which is the best institute for learning QTP and Automation Testing tools in hyderabad with realtime examples and scenarios...I heard about many institutes in Ammerpet hyderabad i.e Suresh Reddy's Smart Solutions, Ashwin Palaparthi's Tech Teach,SUNNYSOFT, SITE institute, I-VINTAGE, siritechnologies and sriven institute..pls suggest me which to choose for learning QTP....Which institute has fasttrack option?

2 Answers  


What is the parameterization?

0 Answers  


Can I change properties of a test object?

0 Answers  


What are the advantages of parameterization ?

0 Answers  


Can u tell me example for virtual objects?

2 Answers   Value Labs,


How can we disable popup blocker?

1 Answers  


Categories