How can you find Local Host Name by Using QTP?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does qtp recognize objects in aut?

602


If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?

1454


What is data driver in qtp?

590


Explain the types of object repositorys in qtp?

588


How do you know the location Id of an object if you know its index id?

605






Where should i find checkpoint and virtual objects's Object properties and values in the QTP 9.2 Means where checkpoints or virtual objects related data will store If i want to get the runtime object properties how can i use Getroproperties on Checkpoints

1474


What is action?

585


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

2467


Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek

1583


Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.

2908


What is synchronization? What are the ways you can synchronize?

663


Can anybody let me know how to test the Drag and drop feature of the column in a .net application...eg..i hav to test the drag and drog feature of a table(swftable) in a application..plze help!!

1768


What is expert view and keyword view?

637


How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.

1835


in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?

6347