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

After fixing the bug, the same bug is raising again and again in new builds what we have to do? That bug is high level bug.

4 Answers   V2 Solutions,


Can any body please tell me the steps of keyword driven framework of QTP.

0 Answers   TCS,


How to call Datable values in the QTP program. exp: I have two parameters like Email id and Password this two i would like to add multiple entries in the datable to use it. What is the difference between Gobal/Action datatable

3 Answers  


How do you done Data-Driven Testing using MS-Word. What is the script for that

3 Answers   IBM,


give the code to count child objects (Total) in the page

1 Answers  






Is it possible to change the property value at runtime? How it is possible?

0 Answers  


What are the file extensions for per-action, shared object repository files and what is the extension for library files?

4 Answers  


What are the automation metrice in your project?

0 Answers   Accenture,


How can i open 5 multiple browser at once through QTP VB script and i want to login with 5 different credentials i already tried with this code but its entering credentials only for first browser and am using datatable to parameterize

2 Answers  


what are the mandatory properties in qtp? what are the library functions in qtp?

3 Answers   Wipro,


If u r using library files (Instead of Check Points) , How do u do bitmap check ?

0 Answers  


give me the code for check point for validating application

1 Answers  


Categories