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 is checkpoint in qtp?
What is the difference between run time object and test object?
Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?
supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?
Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.
Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.
What should we say if interviewer asks "What is ur project architecture?".......Can any one help me with clear information.?????????
I want to do QTP Certification what is the pattern of Question paper.
Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.
How does qtp identify objects in the application?
In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?
can u explain relative path architecture framework in qtp?
In qtp, how you can exit for loop?
Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?
What is the use of Debug Viewer?