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
What are the different attribute used with regular expression?
Can the user toggle between using Local OR and shared OR for the same action?
If the objects hierarchy is changing from build to build, then how you will handle that condition?
What do you mean by iteration?
Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?
What is the difference between run time object and test object?
Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak
What is quicktest professional (qtp)?
There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?
Explain the terms test and business component?
Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)
What is a programmatic description?
How can you pass value one action to another action?
Explain quicktest professional (qtp) testing process?
How to use descriptive programming?