Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How is UFT 11.5 version different from UFT 12.0?

1007


Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.

2392


How do you perform Regreession Testing?

1916


How to attach a file to TD?

1089


how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

1689


Did QTP prove efficient for your project? Yes or No, explain?

6532


how to post xml data from QTP scripts to any application?

1922


How to build scripts that access data from external sources?

2047


What is object spy in quicktest professional (qtp)?

903


Explain how you can find the absolute value of the number in qtp?

1020


How to write business scripts using object repository with different scenarios

1844


What is the extension of the qtp local repository? If it is .mtr then what is .bdb extension stands for?

984


How can i check items sorted or not in a weblist ? Give me the script for this...

1983


How you will rate urself in QTP in the range of 0 to 5

2150


Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

2463