Geeks Talk

Prepare for your Next Interview




obtaining login details from a text document.

This is a discussion on obtaining login details from a text document. within the QTP forums, part of the Software Testing category; Hello, I am trying to find a way to get qtp to login to a system we use using data from a text document/spreadsheet, so rather than re writing ...


Go Back   Geeks Talk > Software Testing > QTP

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-29-2008
Junior Member
 
Join Date: Mar 2008
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
172v6 is on a distinguished road
obtaining login details from a text document.

Hello,

I am trying to find a way to get qtp to login to a system we use using data from a text document/spreadsheet, so rather than re writing the script each time we change user we can just edit the data in the spreadsheet/text document.

Here is an example of the script to logon:
VbWindow("MDIMain_[0-9]+").VbWindow("frmLogin").VbEdit("txtUsername").Set "jamesb"
VbWindow("MDIMain_[0-9]+").VbWindow("frmLogin").VbEdit("txtPassword").SetSecure "488846086df549d68135bc3996d61c1029552651e01f"
VbWindow("MDIMain_[0-9]+").VbWindow("frmLogin").VbButton("Login").Click
VbWindow("MDIMain_[0-9]+").VbWindow("frmLogin").VbButton("OK").Click 35, 15, micMiddleBtn
VbWindow("MDIMain_[0-9]+").VbWindow("frmLogin").VbButton("OK").Click
VbWindow("MDIMain_[0-9]+").Dialog("Activity List").WinButton("No").Click


any help on this matter would be greatly appreciated.

regards James.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-30-2008
Expert Member
 
Join Date: Jan 2007
Location: India
Posts: 179
Thanks: 3
Thanked 13 Times in 13 Posts
NawabShaikh is on a distinguished road
Arrow Re: obtaining login details from a text document.

DataTable is an inbuilt spreadsheet for QTP script, u can place the strings in datatable & fetch them in the script.


DataTable(dtlocalSheet,"UserName")
DataTable(dtlocalSheet,"Password")

UserName & Password are the Columns in the DataTable...

Also please check the manual and revert in case there are any implementation issues.

regards,
Nawab
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Exforsys.com Swing Extreme Testing - Getting the Text of a Text Field admin Web Design 0 07-11-2008 12:40 AM
Text & Text Area Checkpoint ramyamca1984 QTP 4 01-31-2008 10:22 PM
Difference b/w build document and test release document jainbrijesh Testing Issues 0 08-24-2007 06:26 AM
I want to see the table details ramesh_resides Oracle 4 07-12-2007 06:25 AM
Test text file (like EDI document) in QTP sachinramesh QTP 0 06-19-2007 08:39 PM


All times are GMT -4. The time now is 07:22 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved