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

Answers were Sorted based on User's Feedback



How can i open 5 multiple browser at once through QTP VB script and i want to login with 5 differe..

Answer / ruby

For i = 1 to 5
SystemUtil.Run "iexplore","www.gmail.com"
Next
For i = 0 to 4
Browser("title:=Google","Creationtime:=" & i).Page("title:=Google").WebEdit("name:=Usname").Set Datatable("Username")
Browser("Title:=Google","Creationtime:=" & i).Page("title:=.*").WebEdit("name:=Pwd").Set Datatable("Password")
Browser("Creationtime:=" & i).Page("title:=.*").WebButton
("name:=Submit").Click
Next

Is This Answer Correct ?    1 Yes 0 No

How can i open 5 multiple browser at once through QTP VB script and i want to login with 5 differe..

Answer / amarendra kothuru

Using Data parameterization, we can do that or in other
purpose also

Method1:
var_RowCount = DataTable.GetSheet("Action1").GetRowCount
For i = 1 to var_RowCount
DataTable.SetCurrentRow(i)
SystemUtil.Run "iexplore","www.abcd.com"
uname = DataTable("Username",dtLocatSheet)
psd = DataTable("Password",dtLocatSheet)
Browser("index:=0").Page("title:=.*").WebEdit
("name:=Usname").Set uname
Browser("index:=0").Page("title:=.*").WebEdit
("name:=Pwd").Set psd
Browser("index:=0").Page("title:=.*").WebButton
("name:=Go").Click
Next

Method2:
For i = 1 to 5
SystemUtil.Run "iexplore","www.abcd.com"
Next
For i = 1 to 5
Browser("index:=" & i).Page("title:=.*").WebEdit
("name:=Usname").Set uname
Browser("index:=" & i).Page("title:=.*").WebEdit
("name:=Pwd").Set psd
Browser("index:=" & i).Page("title:=.*").WebButton
("name:=Go").Click
Next

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More QTP Interview Questions

What are the challenges you faced during you entire life automation ?

0 Answers   Tech Mahindra,


how to idetfy which test cases are automated?who will deside that plz tell me

0 Answers  


Hi, I have a login page. To login in that page I need to have a valid username and password, which is stored in database. I imported that table to my DataTable in QTP (Global sheet). Now I need to write a code in qtp so that I can login only with valid username and data. my condition is : I want to get username and password from inputbox(which i did) and click on login button- which should verify the datatable for username and password and if value is present only then lofin else stop the testing. DataTable contains columns : LoginName and Password Code: Rowcount= DataTable.GetSheet("Global").GetRowCount msgbox "RowCount= " &RowCount,1 CurrentRow= DataTable.SetCurrentRow(1) Do Browser("").Page("").Frame("Frame").WebEdit("ctl10$ct l00$ctl00$UserName$ctl").Set DataTable("LoginName",1) Browser("").Page("").Frame("Frame").WebEdit("ctl10$ct l00$ctl00$Password$ctl").Set DataTable("Password",1) Browser("").Page("").Frame("Frame").Link("Login").Cli ck CurrentRow=CurrentRow+1 Loop Until CurrentRow>Rowcount Can anyone help? Thanks, Priya

3 Answers  


what is the hierachy of Descreptive programming?

3 Answers   Fiserv,


What r the different filters in defect in quality center

0 Answers  






what is bultin funtaion in QTP &tell me five examples?

5 Answers   Kanbay,


what is main diff of qtp8.2 and qtp9.0?

1 Answers   Covansys,


Did QTP prove efficient for your project? Yes or No, explain?

0 Answers  


Discuss the QTP Environment?

0 Answers  


when we enter url,one page should open.write a vb script ,that page is open or not

2 Answers   Blue Chip India, Persistent,


what is the code in QTP to take screen shot?

4 Answers   TCS,


I want to clear the webedit field without using set"" in qtp script

1 Answers  


Categories