1) click start->run...
2) input notepad
3) write "This is a good test tool" then save
Only be recorded "SystemUtil.Run "notepad","","C:\Documents and Settings\baoju","" in the qtp Expert view,why can't record what i write?
If QTP isn't recording your actions you could try recording in low level or analog mode. When you record against notepad, QTP just captures keystrokes and types them in on playback. So if you wanted to type in the editor you would probably get something like
If it's recording specifically you are interested in then Anderson's approach is best. But if your goal is just to write some text into Notepad and don't care how it is to be done, you could look at the FileSystemObject help on working with files. I think you will find what you are looking for. If not, let me know I can send you one of my skeleton codes.
1) click Test->Record and Run Settings
2) select Windows Applications tab
3) if Record and Run on these applications is selected add Notepad to the list (or just select Record and Run on any application option)