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
We stored into the objects OR and then write the scripting
Why bpt?
why should we give deliver good quality software?
what type of automation is follwed in the project?
Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach
Can we run multiple QTP scripts one after the other without manual intervention? How?
Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?
I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.
what is the hierarchy to use properties in descriptive programming
What are the methods used in UFT to handle exceptions or run-time errors?
Explain actions in qtp ?
Write a QTP script to enter a keyword in to Google search engine?
How would you export a script from one pc to another in qtp?
I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?
What is test object?