Hi can anyone pls suggest how to fetch username(system
login name)and system name in to qtp.I am not using TD or
QC.Thx
Answers were Sorted based on User's Feedback
Answer / anonymous
I think, this works...
But make sure before using it...
xx = Dialog("Login").WebEdit("userName").GetText
'GetText gives you the text from the Edit Box- I think...
msgbox xx
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / siva reddy (us)
var=dialog("Login").winedit("username").getvissibletext
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nreddy
I got the answer.This will work.The one you posted is
You are trying to fetch from dialog box where you have user
name displayed.But this code will fetch from system.
'-----------------------
Dim sys
Set sys = CreateObject("ADSystemInfo")
msgbox "UserName: "& sys.UserName
msgbox "Computer: " & sys.ComputerName
'------------------------
| Is This Answer Correct ? | 0 Yes | 0 No |
Hi N Reddy,
we use use environment variable for fetching username
(system login name).
u can try this
msgbox environment.Value("UserName")
| Is This Answer Correct ? | 0 Yes | 0 No |
Did u use check points during ur work experience ?
What is Virtual Users?
How many types of actions are there in quicktest professional (qtp)?
In this bellow script QTP is not able to getting no. of Links from my Browser. Set desc=description.create desc("micclass").value="Link" Set obj=Browser("creationtime:=0").page("title:=.*").childobjects(desc) msgbox obj.count I am getting "General Run Error".Why QTP is not supporting my Browser,but its running fine in other system.Please help me to overcome this problem.
what is profile tool?
What is the process for creating an automated test script using QTP assuming you have reviewed the manual test case and understand the requirements?
Which environments does qtp support?
Is there a function to find the number of occurrences of sub strings within a string?
What are the Features & Benefits of Quick Test Pro ?
DEFECT LIFE CYCLE,WHO PUT THE STATUS AS OPEN
how to load the *.vbs (or) test generating script in a new machine?
What is the syntax to call one action in another?