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 |
How will you find the current time of the remote machine using QTP script?
In Test Director bug rEPORTS, wHAT ARE THE CONTENTS(fIELDS)? iF yoU PREAPARE BUG REPORT IN eXCEL sHEET , hOW U SEND TO dEVELOPMENT TEAM THRW T.D?
Your roles and responsibilities and daily tasks? (As automation tester)
when i perametarization of the test through outputcheckpoint,i have seen run time error i.e outputcheckpoint mismatch .Plz tell anybody to me(qtp).How to clear that?
How many types of recording modes in qtp? Describe each type with an example where we use them?
What will be happen if i load object repository at run time, but it has already associated.
What is difference b/w AOM,DOM,COM Have u ever is used ny of the models.If so why?
How Does Run time data (Parameterization) is handled in QTP?
give me the code for check point for validating application
in which case & which method we can use "native" property of an object ?
if you have the same application screen with 7 drop down boxes and approximately 70 values how do you test with QTP?
What are the Latest Feature are added In QTP 9.2?