I have a login page like username, password and login. I
have to pass the 50 user names and 50 passwords but
how can i test this page with out using parameters?

Answers were Sorted based on User's Feedback



I have a login page like username, password and login. I have to pass the 50 user names and 50 pass..

Answer / dinesh1433

UserName="user1,user2,,,,,,user50"
Password="pass1,pass2,,,,,,pass50"

arrUserName=Split(UserName,",")
arrPassword=Split("password,",")

For i=0 to 50

systemutil.run "iexplore.exe","gmail.com"

Browser("index:=0").page("index:=0").WebEdit("name:=username").set arrUserName(i)

Browser("index:=0").page("index:=0").WebEdit("name:=password").set arrPassword(i)

Browser("index:=0").page("index:=0").Webbutton("name:=login").click

Browser("index:=0").page("index:=0").close

Next

Is This Answer Correct ?    0 Yes 0 No

I have a login page like username, password and login. I have to pass the 50 user names and 50 pass..

Answer / venkat qtp

window(login).winedit("agent name").set datatable("username",1)
window("login").wineidt("password").set datatable("password",1)
window("login").winbutton("ok").click


here

edit on datatable name

username password

venkat mercury
sita mercury
lakshmi mercury
rani mercury
ramu mercury
krishna mercury
ravi mercury
..........

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More QTP Interview Questions

What is keyword view and Expert view in QTP?

1 Answers   Crea,


Sometimes my QTP scripts works fine and sometimes its not though I am using same shared Repository and am not doing any changes in it.Even though for descriptive programming also its works fine and sometimes it does not work.my application is pretty stable.Could anyone please answer why am facing these types of issue??

1 Answers  


Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?

0 Answers  


In QTP, As a first step wht we will do before going to start a Automation....when it will be decided that we have to go for a Automatio..and who will decide to go for Automation. Any body can pls let me know.. Thanks in Advance..

1 Answers   Wipro,


In QTP I have a parameter in a datatable that is a sentence. I need to take the last word from the sentence and enter it into a field in a web application. How can I setup a parameter to enter in just a portion of the parameter (last word of the sentence) instead of the entire paramater (whole sentence).

2 Answers  






When do go for loop condition in test?

0 Answers  


What is quick test pro?

0 Answers  


i ve an excel in a QC folder. Thru my QTP script i want to open that excel in runtime. I am running this script from QC itself

4 Answers   TCS,


How should i find out whether the cursor is moving horizantally. when tabbing continuously

2 Answers   Livetek,


Can we use Virtual Objects in Discriptive Programming?

5 Answers   Keane India Ltd,


what is purpose of automation?

3 Answers  


what type automation is fofollowed in the project?

1 Answers   Satyam,


Categories