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 / ranga
Hi,
import the data to data table and
Please check the syntax once
you written as ------DataTable("LoginName",1)
DataTable.Value("LoginName",1)
may be above is the problem getting the username n password.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
terminal services client
Both static and dynamic arrays are handled by the vb script. Is it true?
How we can use the database checkpoint on a java web based application in which the database connectivity is done using JDBC->Pure Java type (in this type there is no need to create a DSN). At present in QTP we can fetch database values using checkpoint only through DSN. Is there any programming for this if we don't have DSN (ODBC)
What does it mean when a check point is in red color? What do you do?
How do you synchronization point through DP?
write script for bitmap image?
what is the difference between IE & Netscape in web testing on a log in page
desribe a situation where u faced a stressful situation and how did u cope with it
Describe function procedure in vbscript.
1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.
Explain the terms test and business component?
Explain the parameter in qtp?
What do you to script when objects are removed from application?
How many tabs are available in debug viewer pane?
How to upload excel files into Quality Center using QTP Script and how to delete excel files from Quality?