OPening of notedpad in QTP to write and execute the coding?
Answers were Sorted based on User's Feedback
set fso = createobject("scripting.filesytemobject")
file_path = "c:\nanda.txt"
forwriting =2
forreading = 1
set notepad = fso.createtextfile(file_path,forwriting)
notepad.writeline "this is created by Nanda"
notepad.writeline "this is created on "& now
notepad.close
set notepad = fso.opentextfile(file_path,forreading)
for notepad.atendofstream
n = notepad.readline
msgbox n
Next
this script will create a notepad and write data and read
data in that file.
If any queries...
nanda.dreddy@gmail.com
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / shyam.meghansh
systemutil.Run("C:\WINDOWS\NOTEPAD.exe")
Window("Notepad").WinEditor("Edit").Type "Hi This is shyam "
Window("Notepad").WinEditor("Edit").Type micCtrlDwn + "s" +
micCtrlUp
Window("Notepad").Dialog("Save As").WinEdit("File
name:").Set "demo"
Window("Notepad").Dialog("Save As").WinButton("Save").Click
...........
Any more question mail me testingwithshyam@gmail.com
Is This Answer Correct ? | 1 Yes | 0 No |
How to associate shared object repository to test in qtp?
Can anybody give the script of below things. 1. Add sheet 2. Adding columns 3. Set the values in that columns(In the rows) 4. Close the sheet 5. How can we create 3 sheets in one Excel sheet??
What is action?
How do I lauch my test website using code from qtp in different environmet, uat and PPTE?
How to check feasibility of the appliction?in automation testing?
How can we do Data driven testing Using For loop in QTP?
How you automate test scripts
How many actions we can write in a test?
What is chaild object method? When we will go for chaild object method? How to use chaild object method?
what are the Common Problems in S/w development process
Difference between test object and run time object?
How to test login page by using QTP