How to find local host name using QTP?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined

1469


How to associate function library at a run time?

711


I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next

1342


Hi How to retrieve data from web element line by line?

1575


How to create Reusable and Multiple Actions?

1717






What do you mean by checkpoints in qtp?

563


Did QTP prove efficient for your project? Yes or No, explain?

6124


Have you done batch testing in qtp? If yes how you are doing?

516


Hybrid framework supports Descriptive programming. Is it true?

660


how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief

1543


What is the use of running the scripts in Hidden-mode in UFT?

692


Is it possible to refer the same object for referring more than one object that are of different class using the descriptive programming approach? Suppose my code is 'To create the object named as obj Set obj=Description.Create() 'To define the values obj("title").value="IE" obj("type").value="text" obj("html tag").value="INPUT" 'To set the value Browser("IE").Page("Yahoo").WebEdit(obj).Set "xyz" Can I refer the "obj" object for the three objects like Browser,page and webedit objects? If so how?

1583


what is actually contain test report? can anybody post the test report

1477


Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.

639


How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?

3064