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 |
Can i run the qtp, without OBJECT REPOSTIRY...
How to invoke QTP using Dos prompt ?
How to supress warnings from the "Test results page"?
i have string "I LIKE INDIA"..how to i get LIKE from the sting..
There is one parent browser and 'n' number of child browsers on desktop. Write a code to close all the child browsers but parent browser should not be closed.
What is the Difference between test object and run time object?
Hi, my requirement is to make a query in SQL using QTP. And i have to get the results of that query and i have to use those results for future testing. I created a driver but i dont know the code for using this Driver. please help me by providing the solution for y requorement
Analyzing the checpoint results?
Hi Friends, I worked with 8.2 not with 9.2. Please help me in this prob. I created one script and recorded some think and save as Test 1 then I opened process--open the object repository manager. Switch to file->save->give some name->save as Objectrepo1.tsr file. (This is the global repository file.) Then I went to object repository->tools-> associate repository ->click + icon ->open the previously saved Objectrepo1.tsr file. This is the global repository Now I created one more script and save as Test 2. In this script I am calling script with the Help of "Call of existing action" and I executed but QTP is not able to execute B’cos it is QTP is not able to read the Object Repository of Test 1. Please let me know why? Once I made Script 1 as a shared Obj. Repository so it would not give any Problem. Right?
When to Insert transactions in QTP?
i am new QTP... please tell me automation frameworks , types & for whiich type of applications frameworks are used & how to generate script in keyword driven framework
1. How to capture data from images in QTP and produce them in Excel sheet