Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing Envoirnment Variable
#1
Solved: 11 Years, 4 Months, 1 Week ago
Hi,
1. I created a Insert Output value for an object's Text property
2. Directing this output to a User deifned Envoirnment variable (say "Test")
3. Now I want use this "Test" variable in my program like

Code:
do
<statements>
loop while <Test ="Something">

Here I dont know that how to acees the user defined env var "Test" Value

I tried :
Code:
Envoirnment.value("Test") = "something"    -> Didnt Work
           "Test" = "somehting"                              -> Didnt Work

Could ypu please tell me how can accomplish this task ?

Thanks
Ramesh
Reply
#2
Solved: 11 Years, 4 Months, 1 Week ago
Code:
var = Environment.value("Test")
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 11 Years, 4 Months, 1 Week ago
Thanks for reply
I tried the same but it gives me "Type mismatch" Error
I declared var as : dim var
Reply
#4
Solved: 11 Years, 4 Months, 1 Week ago
Please find the below example.

Code:
Environment.Value("a") = "aadc"
MsgBox Environment.Value("a")
var = Environment.Value("a")
MsgBox var
Reply
#5
Solved: 11 Years, 4 Months, 1 Week ago
hi Prasanth,

Hi,
I have basically created a Insert Output value for an object's Text property and Directed this output to a User deifned Envoirnment variable (say "Test"). Now I want use this "Test" variable in my program like

when i try ; var = Environment.Value("a") then i get type mismatch error.

Thanks
Ramesh
Reply
#6
Solved: 11 Years, 4 Months, 1 Week ago
Hi all,

It worked fine with your suggeted code.
I dont know why it was giving the problem at the first time while i was trying the smae code.

Thanks All
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Accessing Environment variable value in Library file vishruth143 1 2,573 09-07-2013, 05:11 AM
Last Post: jacosta
  ACCESSING OBJECR REPOSITORY SHARED ONE babukaturi 1 2,544 04-03-2012, 12:03 PM
Last Post: sshukla12
  Accessing an array returned from a function sqadri 2 5,666 03-28-2012, 09:31 PM
Last Post: sqadri
Sad Accessing Nodes Moon 0 2,080 11-03-2011, 02:05 AM
Last Post: Moon
Toungue Getting problems while accessing data from Excel Sheet SNR 3 3,241 05-08-2009, 01:46 PM
Last Post: SNR

Forum Jump:


Users browsing this thread: 1 Guest(s)