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

In a webtable, lets say there are 10 records and 1 column. let say "image" is available for 1st,2nd and 3rd records and 4th onwards image is not available. How to recognise for that cell image is available or not?

2 Answers  


Username field having some string mistake like"user naem".what type of testing i prefer to test spell check.

6 Answers   GE,


1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.

0 Answers  


How can we translate the steps between the Keyword and Expert Views?

1 Answers  


What are the different types of Database checkpoints in QTP? when they are used?

2 Answers  






QTP identified the object but not performing the desired action???what could be the reason?????

1 Answers   Mphasis,


what is recovery manager and recovey scenerio?

2 Answers   BirlaSoft,


How do u retrieve data from a text file into different variables. i.e. in a text file named "source" , the data is like : india,1000,japan,200,china,50,singapore,45050 this is given in the first line of the text file. in the second line of the text file the dta is: sun,moon,planet,river,earth,water if u use "readline" method by using FSO concept u can retrieve the entire line in to a variable. but i want to import each field (ex: "india" in one variable, "1000" in another variable etc..). Apprecitae proper replies.

5 Answers   Semantic Space,


what is difference betweein qtp 9.0 and 9.2

1 Answers  


IF application is a Java-based application means 2 0r 3 tier application. How the script will be in QTP. pls kindly give some sample script.

5 Answers   Wipro,


how qtp handles customised object

1 Answers  


How will u find that how many List boxes( and check boxes) are present in one particular window

8 Answers  


Categories