Hi All,
I am very new to QTP and is trying to automate some part of my testing.
I have some piece of code where am trying to copy one particular file (contents) to text area in my application.
Following is what i have achieved till now.
After this i wanted to copy the content of "text" to clipboard so that i can use pasting it to my app text area, which hopefully by the following code.
Your advices will be much helpful for me to proceed.
Thanks in advance . .
Regards
I am very new to QTP and is trying to automate some part of my testing.
I have some piece of code where am trying to copy one particular file (contents) to text area in my application.
Following is what i have achieved till now.
Code:
Function readTextFromFile(pathToFile)
Set fso = createObject("Scripting.FileSystemObject")
If fso.FileExists(pathToFile) = True Then
Set f = fso.OpenTextFile(pathToFile, 1)
readTextFromFile = f.ReadAll
f.Close
End If
End Function
text = readTextFromFile("Path of file")
After this i wanted to copy the content of "text" to clipboard so that i can use pasting it to my app text area, which hopefully by the following code.
Code:
SwfWindow("MyApplication").SwfEditor("xmlTextBox").Type micCtrlDwn + "v" + micCtrlUp
Your advices will be much helpful for me to proceed.
Thanks in advance . .
Regards