How to find local host name using QTP?
Answers were Sorted based on User's Feedback
Answer / arunsingh
LHN=Environment.value("LocalHostName")
msgbox LHN
Run it, you will get you local host name.
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / aiswaryan
Thanks Arun.
msgbox (environment("LocalHostName"))
this will also return the same. since these (LocalHostName,
OS etc) are built in environment variables, we can get the
values thro above syntax.
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / aiswaryan
'Record the opening of command prompt in low level mode.
SystemUtil.Run "cmd","","C:\Documents and
Settings\<user>",""
wait 5
Record entering the text "hostname" in cmd prompt in Analog
mode .
Desktop.RunAnalog "Track2"
I have just started learning QTP. I am finding a proper
script to do the above task without recording in analog. If
anyone know please post the answers. Thx.
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / sandeep
sorry this not the answer for this question . sorry.act I
want to post the ans for to open a notepad and write and
read contents of the notepad.once again sorry for
inconvience.
Thank You
Sailaja.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / ravi
if you like to hardcode its value, find here
control panel -> system -> general
Read the second line under Registered to:
Is This Answer Correct ? | 0 Yes | 5 No |
Answer / sailaja
The above code is giving error at for loop
Dim fso,notepad
set fso = createobject("scripting.filesystemobject")
file_path = "c:\nandu.txt"
'forwriting =2
'forreading = 1
set notepad = fso.createtextfile(file_path,1)
notepad.writeline "this is created by Nanda"
notepad.writeline"this is created on "
set notepad = fso.opentextfile(file_path,1)
Do
n = notepad.readline
msgbox n
Loop until ( notepad.atendofstream=true)
This will work fine.
Thank you
Sailaja
Is This Answer Correct ? | 0 Yes | 8 No |
is it possible to map an image as standard Object or u've to treat as virtual? how to map an Dynamic image into standard object?
What are the features and benefits of Quick Test Pro(QTP)?
Tell me about userdefined functions ?
I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me
I Selected for TCS-Chennai(Contract to hire) position plz suggest me whether i have to join or not
i have a window , initial its name is "NEW CUSTOMER" i have to enter the details of customer in the test object fields and after saving the window name is automatically changing with the customer name . so how to identify that window after saving. (i am using descriptive programming.)
What is active screen?
Did u use check points during ur work experience ?
what is smart identification in qtp? pls any give details? thanks in advance
what is the main process in QTP?
what is main diff of qtp8.2 and qtp9.0?
how can we compare descriptive programing with a regular expression