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 |
Why you are Using Descriptive programming instead of Object Repository?
Discuss QTP Environment.
How should I check my code( Before going to execute) without executing the script in QTP
what sort of things what u put in Bug Report ?
What is the XML file architecture ?
Can we directly automate test script according to requirements?
Write the Test Cases for ATM(Any Time Money)
In QTP I have a parameter in a datatable that is a sentence. I need to take the last word from the sentence and enter it into a field in a web application. How can I setup a parameter to enter in just a portion of the parameter (last word of the sentence) instead of the entire paramater (whole sentence).
What are the two types of repositories available, explain them?
What are the differences between qtp and winrunner?
what is the difference between the modular framework and datadriven frame work
What is DOM