Find local host name using QTP

How to find local host name using QTP

Questions by dabba

Showing Answers 1 - 2 of 2 Answers

avykunt

  • May 23rd, 2008
 

This gives you the exact Answer :
computername=Environment("LocalHostName")
Msgbox computername

you can access all these server name, operating system name, Local Host name from the System build variables (Built-in variables).You can find these Built-in variables in the QTP: File>>settings>>Environment tab from the Test settings window>>choose the variable type as Built-in>>here you can find LocalHostName>>If you select LocalHostName>>your Computer Name displays below in Edit Box.

You can access these Built-in variables using Environment Object.The above one is the example.

I think this will be clear.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions