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
Answer Posted / rangalnrt
Hi,
May be you missed the syntax
you written---DataTable("LoginName",1)
DataTable.Value("LoginName",1)
Please check once whether it will solve your problem.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek
Hi All, I Want To excute scripts batch without using QC .I need code for that Thanks Balaji
How many types of recording modes in qtp? Describe each type with an example where we use them?
i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?
Explain about Test Fusion Report of QTP?
How many types of recording modes are there?
Hello Everyone, Please provide me the practical example of business component concept of QTP.Like how to create business component,how to connect the quality center etc.... Thanks in advance, Gaytri
What is QTP’s model for test creation?
What are main panes available in qtp test browser?
In qtp, explain what is crypt object
What is difference between shared and local object repository?
What is the short cut keys for the following?
i need qtp tutorial. pls send it to sridhar.k151@g mail.com
give me the code to save all messages of inbox of gmail into a folder and notepad
What ate the Technologies supported by QTP?