Hi
Yes, it's possible.
Before running test you can save text, that should be copied, to some text file.
Below code that opens this file and reads it's content to some variable. As I understand, you know how to paste text in text area of browser, and you just need code how to read text from file.
I write function for you that receives pathToFile as argument and returns text, that this file contains:
Using this function:
Yes, it's possible.
Before running test you can save text, that should be copied, to some text file.
Below code that opens this file and reads it's content to some variable. As I understand, you know how to paste text in text area of browser, and you just need code how to read text from file.
I write function for you that receives pathToFile as argument and returns text, that this file contains:
Code:
Function readTextFromFile(pathToFile)
'creating File System Object
Set fso = createObject("Scripting.FileSystemObject")
If fso.FileExists(pathToFile) = True Then
'open text file for reading
Set f = fso.openTextFile(pathToFile, 1)
'read all text from file and return it to function
readTextFromFile = f.ReadAll
'close file
f.Close
End If
End Function
Using this function:
Code:
text = readTextFromFile(filePath)