Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
input / ouput parameters
#1
Solved: 11 Years, 4 Months ago
Hi folks!

A quick question as parameters are confusing me.

I have a test that creates a file that I need to upload into the system I am working on. The file creation works and is no problem.

The basic outline of the test is as follows:
2 actions
Action 1 create file
Action 2 process file


Action 1
1. Create the file
2. set a variable with the name of the file

Action 2
1. get the name of the file (from action 1) and process this


So I need to somehow pass this name from the first action to the second action.

How do I do this? I did try using the following:

Going to the action properties of action 1 and setting an output parameter

name : filename - type string

And then going to the action 2 properties and setting the input parameter

name infile - type string


How do I accomplish this task do I need datatable for this or can it be done with variables?


Reply
#2
Solved: 11 Years, 4 Months ago
Hi Jove,

Save the file name in DataTable by using DataTable.GlobalSheet.AddParameter and then fetch it form Action 2.
Reply
#3
Solved: 11 Years, 4 Months ago
Hi manish,

Sorry for the slow response I did manage to get the datatable populated with my value like you said.

Thanks!

Reply
#4
Solved: 11 Years, 4 Months ago
Hi jove1776,

You can use any one of the following to complete your task Smile
1. Environment Variables
2. Output values
3. Action Parameters
4. Dictionary Objects

Example:
Action1:
Code:
Filename_created="sample file which got created"
Environment("FileName")=Filename_created

Action2:
'Retrieve the name of the file using the above environment variable as shown below.

Code:
FileTobeProcessed=Environment("FileName")
' write the code for processing the file
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to input Japanese Character through UFT Alaguraja 0 909 07-01-2020, 11:32 AM
Last Post: Alaguraja
  Set data parameters Mik2s 1 1,492 03-07-2019, 10:18 PM
Last Post: supputuri
  How to get input from the user in QTP? shanthiK 10 18,588 08-07-2017, 11:34 PM
Last Post: zunebuggy
  Part of parameters missing when passing between actions skumar007 1 3,007 10-10-2014, 02:00 AM
Last Post: skumar007
  Launching .exe file with parameters magnifyingone 1 3,174 08-28-2014, 06:39 PM
Last Post: dplank

Forum Jump:


Users browsing this thread: 1 Guest(s)