Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameterize
#1
Hi,
I'm trying to parameterize username, password, customername and tickets.I've entered the contents in the datatable, also the parameter name in the DT column name.....but i'm stuck with the script.....could you please give me the steps for that.
I'm currently working on QTP11

Thankyou in advance
Reply
#2
Can you please provide your code?
Reply
#3
Code:
Dialog("login").WinEdit("AgentName").Set Datatable.Value Dialog("login").WinEdit("AgentName").Set ("username, dt global sheet") Dialog("login").WinEdit("Agentname").Set("password, dt global sheet")
Reply
#4
Hi Melody M,

Please try this code....

Code:
' / * Store the datatable value in variables strUserName = DataTable("pUserName", dtGlobalSheet) strPassword = DataTable("pPassword", dtGlobalSheet) ' / * Enter the values in the fields Dialog("login").WebEdit("AgentName").Set strUserName Dialog("login").WebEdit("Password").SetSecure strPassword ' / * Note : Change the values of webEdit as per your application


I hope It will work for you......
Smile
Reply
#5
Saini,
Thank you so much for taking my Q!
This time i tried parameterizing Username, password, customername and ticket.....i tried ur code, when i ran the test it failed, but if i run it from step- the test result is done.

Is this normal?

Code:
' / * Store the datatable value in variables strUserName = DataTable("pUserName", dtGlobalSheet) strPassword = DataTable("pPassword", dtGlobalSheet) ' / * Enter the values in the fields Dialog("login").WebEdit("mercury").Set str"Mel" Dialog("login").WebEdit("mercury").SetSecure strPassword Dialog("login").WebEdit("Jojo").Set str"Mary" Dialog("login").WebEdit("jojo").SetSecure strPassword Dialog("login").WebEdit("Jojo").Set str"Sia" Dialog("login").WebEdit("mercury").SetSecure strPassword
Reply
#6
Wink 
Hi Melody,

Please update your code by following the below example.

Code:
' / * Your Code Dialog("login").WebEdit("mercury").Set str"Mel" ' / * Updated Code Dialog("login").WebEdit("mercury").Set "Melody" ' / * or you can use strName = "Melody" Dialog("login").WebEdit("mercury").strName

I hope It should work .....

Smile
Reply
#7
Thank you Ankur, i'll try with the updated code:-)
Reply
#8
Ankur,
Still not workingSad Its not your script, gotto be some mistake from my side....thank you anyways!
Reply
#9
I am working on version 10...have not worked on version11, Try this once and pls let me know if it works
Code:
' / * Store the datatable value in variables strUserName = DataTable.Value("pUserName", dtGlobalSheet) strPassword = DataTable.Value("pPassword", dtGlobalSheet) ' / * Enter the values in the fields Dialog("login").WebEdit("AgentName").Set strUserName Dialog("login").WebEdit("Password").SetSecure strPassword
Reply
#10
Ankur and Kavitha,
I tried this code and the results were done without any errors......thank you bothSmile

Code:
Parameterizing- Username(AJ), password(mercury), tickets( 2) and customername(mel) strName = "AJ" Dialog("login").WebEdit("mercury").strName strName="Tickets" Dialog("login").wedEdit("2").strName strName="Mel" Dialog("login").wedEdit("Mel").strName
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  parameterize Excel Sheet Name in SQL bjitsidhu 0 3,244 07-20-2014, 08:34 AM
Last Post: bjitsidhu
  Parameterize at different pace, and multiple write to Excel joncfrazier 0 2,982 07-10-2012, 12:05 AM
Last Post: joncfrazier
  Parameterize Excel Columns for 2-Dimensional Array defcon3 2 4,147 06-20-2012, 04:59 PM
Last Post: defcon3
  How to parameterize the value which is in Object repository AdhikariS 4 8,222 09-06-2011, 12:38 PM
Last Post: AdhikariS
  Parameterize s.savitha 1 2,588 08-22-2011, 11:02 PM
Last Post: Arul

Forum Jump:


Users browsing this thread: 1 Guest(s)