QTP : Set the value to the winedit box in run time

Hi,

I want set the value to the Winedit box in the Run time.

When i am save my file i want to give the name of each file in run time.

Link first time i have save file 1
next file 2
next file 3
next file 4

like this.

But in this the numbers have to display in the run time and have the save the file.

Like loop
for i = 1 to 100
Text & i
Next.

For this how i write the script
normally we write Winedit("textname").set "file"

But in this we cant set values using continuously

Plz help to set the value.

Thx

Punitha.R

Questions by Punitha.R   answers by Punitha.R

Showing Answers 1 - 6 of 6 Answers

I am not sure if I entirely understand what you are looking for. You might have to provide more information/detail. You wait to set some value in WinEdit then you talk about some file? You need to be more clear.

As for setting value in WinEdit, all you need is this:

Browser("Browser").Page("Page").WinEdit("name:=WhatEver").Set "#"&i

  Was this answer useful?  Yes

ManjuPillae

  • Mar 26th, 2008
 

You need to give save a files using different files names that are continous,
say File1, File2 ...

Then we have constant File and varying number.
So, take fName as variable

For i = 1 to n
    fName = File & i

    'If you need to set the file name in the WinEdit box then
    Window().WinEdit().Set fName
Next

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions