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 / sandip mehra
First of all you have to add a sheet at the runtime data
table and then have to import the data from the excel sheet
so for that you have to use import sheet method, then after
follow all your process means you can use your script which
you have written over here.
follow the process and then let me know if you'll get any
error.
Regards
Sandeep Mehra
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
1--How many functions u develop 2--What is an array 3-- where is ur server 4--U involved in unit testing 5--how ur test the background colour using QTP
what are the limitations of smart identification in qtp 9.0
what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
What are the major/ important methods, functions in QTP we use realtime testing
How can get count of list box?
Key word driven framework
How can you handle exceptions in qtp?
How will you check that your test cases covered all the requirements?
Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please
hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....
what is impact analysis on regression testing?
Can any one send me the QTP Basic Coding Samples?
Hi, Hope you viewers are doing fine with good health. What are the steps and connection parameters to connect to Oracle db ? Can you connect with just the Oracle client or Oracle XE ? Cheers!!
How will you report the bug and explain the defect tracking sheet you handled?