Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regarding Parameterising Values using Data Tabke
#1
Solved: 11 Years, 4 Months ago
Hello All,

I have started off qith QTP 9.1 recently.
My Question is as below:
I need to run Regression testcases using QTP9.1.I have recorded a script following the End to End flow.Now my question is how to genraically specify values as theye are multiple values that need to be passed for the same login for multiple test cases.Pls help me with the code..I was asked to use Data Table but how to implement data table i am not aware of..Pls suggest.

Code below :
Pls find the below code where i need to pass different values for Prcing Account Types :
Code:
Browser("Siebel Media Systest 10.9.2").Page("Siebel Media Systest 10.9.2").WebEdit("_SweUserName").Set  "abcd"
Browser("Siebel Media Systest 10.9.2").Page("Siebel Media Systest 10.9.2").WebEdit("_SwePassword").SetSecure "4b02abb21d04b0e43aa386e107cc583c3477"
Browser("Siebel Media Systest 10.9.2").Page("Siebel Media Systest 10.9.2").WebEdit("_SwePassword").Submit
SiebApplication("Siebel Media Systest 10.9.2").SiebPageTabs("PageTabs").GotoScreen "Accounts Screen"
Browser("Siebel Media Systest 10.9.2_2").Page("Siebel Media Systest 10.9.2").Frame("View Frame").SblButton("Go").Click
SiebApplication("Siebel Media Systest 10.9.2").SiebScreen("Accounts").SiebView("All Accounts").SiebApplet("Account").SiebButton("Query").Click
SiebApplication("Siebel Media Systest 10.9.2").SiebScreen("Accounts").SiebView("All Accounts").SiebApplet("Account").SiebPicklist("Pricing Account Types").Select "Academic"
SiebApplication("Siebel Media Systest 10.9.2").SiebScreen("Accounts").SiebView("All Accounts").SiebApplet("Account").SiebPicklist("Account Class").Select "Regular Account"
Reply
#2
Solved: 11 Years, 4 Months ago
This should help you
1.Create parameters as column in your datatable local/global (as per your requirement) sheet for different fields like username. password ..
2.use these parameters in your statements using Datatable like the code below
Code:
Browser("Siebel Media Systest 10.9.2").Page("Siebel Media Systest 10.9.2").WebEdit("_SweUserName").Set Datatable("UserName", dtLocalSheet)
Browser("Siebel Media Systest 10.9.2").Page("Siebel Media Systest 10.9.2").WebEdit("_SwePassword").Set Datatable("Password", dtLocalSheet)

Same for rest of statements
...

Reply
#3
Solved: 11 Years, 4 Months ago
1. Create columns for what ever inputs you want to parameter in the datasheet
2. then follow the Saket's intructions.

or

Use the data driver wizard in the QTP.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading values form data table new4qtp 8 8,367 08-02-2010, 05:16 PM
Last Post: PrabhatN
  how to validate combobox values with testdata values 1981.madhu@gmail.com 3 6,010 09-09-2009, 06:53 PM
Last Post: Saket
  Checking if values of Listbox/Combo box on a web page the same with values in DB? robocom 4 8,401 07-08-2009, 01:52 PM
Last Post: robocom
  Values in Data Table Anna 1 1,875 07-24-2008, 12:35 PM
Last Post: siri

Forum Jump:


Users browsing this thread: 1 Guest(s)