Hi,

You can store your values in a excel sheet.

Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Application.Visible = True
Set ExcelBook = ExcelApp.Workbooks.Open(FilePath)
Set ExcelSheet = ExcelBook.Worksheets("Sheet1")
Usr = ExcelSheet.Cells(1, "A").Value
Pwd = ExcelSheet.Cells(2, "A").Value
Url = ExcelSheet.Cells(3, "A").Value

(OR)

You can store the data in a notepad as,
Username=Raji;Password=123;Url=xyz.com;

Const ForReading = 1
Set FSOobj = CreateObject("Scripting.FileSystemObject")
Set TSObj = FSOobj.OpenTextFile(FilePath, ForReading, False)
Val = TSObj.ReadAll()
Arr = Split(Val, ";")
Usr = Split(Arr(0), "=")
Pwd = Split(Arr(1), "=")
Url = Split(Arr(2), "=")
Val = "//" & Trim(Usr(1)) & ":" & Trim(Pwd(1)) & "@" & Trim(Url(1))

Regards,
Varma

On Apr 10, 8:49 pm, Raji <[email protected]> wrote:
> Hi everyone I want to place all my details in a external  file and
> pass them to QTP Action as per the need. How can I do that?
> This is the example of data file
> Username:=Raji
> Password=123
> url=xyz.com
> File="C:\Doc settngs\desktop\qtptest.wmv'
> It is ok to do any type of file but should be external file.
> Once i get those parameters, i have to use those parameters like this
> Open //Raji:[email protected]
> So how to pass this parameters to the open statement.
>
> Pls help.
> Thanks,
> Raji

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to