Prepare for your Next Interview
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 ...
|
|||
|
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. |
| Sponsored Links |
|
|||
|
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 |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| 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 |