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 |
How to automate a script in mainframes environment? I have the terminal emulator Add in. Describe in detail.
QTP in mumbai
Hi all, i have installed QTP8.2 in my system. but script is not generating while recording. What is the problem? is any file missing? pls let me know anybody...Thnaks
Diff between WEB APPLICATION AND CLIENT-SERVER APPLICATION?
How QTP recognizes Objects in AUT?
Name the properties you would use for identifying a browser and page when using descriptive programming?
Plz explain about MATCH/EXACT MATCH/IGNORE SPAGE in text check points?
HI. Plz Clarifie my doubt,having 2+yrs experience in Testing , But My accedamics(Xth,INTER) are Less than 60%, But B.Tech 72%. It creats any problem , When i change to any MNC. plz tell me......... lot of friends told it's a problem, Some people says NO problem, What .............
what is selective recording ? and normal recording?
In real time whenever we found bug , after that where you send to that bug. send to T.Lead or Directly Developer. Plz explain me?
I AM TRYING PORT CODE FROM WINRUNNER TO QTP AND DON'T KNOW TO HOW TO CHECK THE ERRORS. IN WINRUNNER FUNCTION RETURNS EIGHER 0 OR -1 AGAINST WHICH RESULT CAN BE MADE PASS OR FAIL BUT IN QTP I DON'T SEE FUNCTIONS RETURNING ANY VALUE. APPRECIATE IF ANYONE COULD HELP ME CONVERTING FOLLWOING WINRUNNER CODE TO QTP. set_window("Customer Service"); rc = web_obj_get_text("Summary","#2","#4",ssn,""," ",1); if (rc != E_OK) { report_msg("[GetSubscriberSummary] Could Not get subscriber SSN; rc = "&rc); myRC = rc; } else { ssn = StripBlank(ssn); if (DEBUG) report_msg ("[GetSubscriberSummary] SSN: "&ssn); }
where the object repository is located?how to choose the object repository as shared or action object repositories?