![]() |
|
Unix commands - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Unix commands (/Thread-Unix-commands) |
Unix commands - stevol - 06-30-2008 Hi, from QTP I have launched a SSH Client where I use unix commands. Here I create a variable: how can I use this variable out of unix commands, as QTP variable? ex: Code: ...Thanks RE: Unix commands - Ankur - 07-01-2008 Are you able to record the commands from QTP. If no, what are the add-ins you are using. RE: Unix commands - stevol - 07-01-2008 yes I am able to write commands and obtain expected results from QTP. My problem is that I define a variable with a certain value inside shell, but I would use this value also outside the shell, so that I can use the Reporter object with classic If conditions. Is it possible? Thanks RE: Unix commands - Ankur - 07-01-2008 that is what my point is how are you interacting with shell application...how are you passing inputs to it...the same way can't you extract output from it? RE: Unix commands - stevol - 07-01-2008 mmhhh... i don't believe to can use the same way. I interact from QTP to SSH client defining objects and passing text strings + enter, in this way: Code: dim crt, conn, tree, butt, finestrai.e. QTP uses SSH client as ... ehm... a monkey worker :-) Now the variable "esist" will be =0 or <>0 according to the existence of file.log, but only on this SSH client, not in the script... i can't use "esist" in if-statements... i would need something similar to getroproperty to capture the value of "esist" inside a QTP variable... as: Code: dim existIs it possible in some other way or it can't be return in QTP from other applications? maybe i should do a ftp from machinexyz to my pc with SSH client, then create an object with Scripting.FileSystemObject... sorry for post length and thanks |