How can you find Local Host Name by Using QTP?

Answers were Sorted based on User's Feedback



How can you find Local Host Name by Using QTP?..

Answer / raghavendra c

Thro' the built-in Environment variables we can fetch the
system environment details. One of such variable is
localhostname.
Syntax :- msgbox environment("LocalHostname")

Is This Answer Correct ?    7 Yes 1 No

How can you find Local Host Name by Using QTP?..

Answer / sudheer

If u want 2 knw the local host name
u can Run B'low Script u'll get the LHN name.

LHN=Environment.value("LocalHostName")
msgbox LHN




SuDhEeR BONAM...:)

Is This Answer Correct ?    5 Yes 0 No

How can you find Local Host Name by Using QTP?..

Answer / nani

Hi let u try this code to know u r user name and local host
name.

x= Environment.Value("UserName")

msgbox x





Set sys = CreateObject
("ADSystemInfo")

msgbox "UserName: " &
sys.UserName

msgbox "Computer: " & sys.ComputerName





x=Environment.Value("UserName")

Nani..

Is This Answer Correct ?    3 Yes 1 No

How can you find Local Host Name by Using QTP?..

Answer / sushma

msgbox Environment("LocalHostName")

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More QTP Interview Questions

What is object repository?

3 Answers  


I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?

0 Answers  


What are the methods of the TextStream object that are used for reading from a text file?

0 Answers  


what is the smart identification techniqu?what r the different mechanisums used in it?

0 Answers   Accenture,


how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me

0 Answers  






can any body clearly explain about hybridframework with the explanation for files what ever we come acros in this frame work?

4 Answers   Wipro,


from where we will retrieve data for data driven tests in qtp?

3 Answers  


Can you list some technologies that support qtp?

0 Answers  


I want to check in the data table(Globalsheet) column exist or not through script .If column not exist only proceeded to next step Pls tell me how to proceeded?

5 Answers   Syntel,


I have java based application on my computer. Can I install QTP on it? What are system requirements for installing QTP?

3 Answers  


What the genaric function to connect Sql Server using Sql Server Authentication and Windows Authentication

1 Answers  


What is a Run-Time Data Table? Where can I find and view this table?

4 Answers  


Categories