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
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 |
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 |
Is there any vbscript in QTP for Data Driven Test instead of using the option provided by QTP?
how to test background color and dynamic images during runtime
How to switch between browser tabs? )moving from one tab to another tab)
How to execute a WinRunner Script in QTP?
waht is the diff b/w Environment variable and Global variable in qtp?? explain types of variable in qtp??
what is difference betweein qtp 9.0 and 9.2
Could we use QTP for java project(Which is develop in Netbeans and My SQL) otherwise which one is suitable?
write a qtp script to verify that the business price is twice the economy price in flight reservation window
Write VB script to test given number is Prime Number
How to change the run-time value of a property for an object?
write a script for allinterview-submit Question first we've to select Choose Category,second select Sub- Category(Which is comes in to runtime)third select Question Type.for that give some descriptive and vb script
Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?