Micro Focus QTP (UFT) Forums
How to read a unix flat file from a unix server using QTP - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to read a unix flat file from a unix server using QTP (/Thread-How-to-read-a-unix-flat-file-from-a-unix-server-using-QTP)



How to read a unix flat file from a unix server using QTP - vinayjames.b05 - 03-06-2011

I am using QTP in windows. manually i use putty to read the unix file.
if i want to automate this, how do i read file from unix server.
thanks in advance!!!


RE: How to read a unix flat file from a unix server using QTP - amitv - 03-06-2011

FTP the file from Unix to Windows and read it using readall.
You can also use gettextUtil and getVisibleText for this.


RE: How to read a unix flat file from a unix server using QTP - basanth27 - 03-17-2011

If you are still looking for an answer this should be it.
Interact With Unxi through QTP - Without Putty


RE: How to read a unix flat file from a unix server using QTP - gunaseakaran - 06-18-2012

i need to validate the return code after executing the simple command in unix machine loggedin thru putty
logged in to the system thru putty using telnet and recorded, i need to automate and validate
the return code after executing simple command. pls send some examples to try it out.

tried gettextvalue,checkpoints no results
Code:
systemutil.run "C:\putty.exe"

Window("PuTTY Configuration").WinRadioButton("Telnet").Set
Window("PuTTY Configuration").WinEdit("Host Name (or IP address)").Set "hostname"
Window("PuTTY Configuration").WinButton("Open").Click
wait 2
Window("PuTTY").Type "root"
Window("PuTTY").Type  micReturn


wait 1
Window("PuTTY").Type "test*help"
Window("PuTTY").Type  micReturn
wait 1
Window("PuTTY").Type "uname -a"
Window("PuTTY").Type  micReturn
wait 1
Window("PuTTY").Type."echo $?
Window("PuTTY").Type  micReturn
0

validation is like. if i get "0" my command is successful else the executed commad is failed

thru QTP GUI i am able to execute(write) the command to the putty window in a unix machine
ex : window(PuTTY).Type <unix commands to be executed> can i read it thru same window ? any suggestion

pls give the steps


Thanks in advance
Guna