Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Select does not work together with Environment.Value
#1
Solved: 10 Years, 2 Months, 3 Weeks ago
May some help me with the following syntax. For some reason my “Select” does not work with my “Environment.Value”. I am getting the following error message “Invalid procedure call or argument”

Code:
Browser("Browser Name").Page("Page Name").Frame("fsbottom").WebList("Dealer Code").Select Environment.Value("Dealer_Code")

When I change the Select statement to a number it works

Code:
Browser("Browser Name").Page("Page Name").Frame("fsbottom").WebList("Dealer Code").Select “1234”
#2
Solved: 10 Years, 2 Months, 3 Weeks ago
What does the msgbox pop? Does it show a value and if yes, what does it display?
Code:
msgbox Environment.Value("Dealer_Code")
Browser("Browser Name").Page("Page Name").Frame("fsbottom").WebList("Dealer Code").Select Environment.Value("Dealer_Code")
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
#3
Solved: 10 Years, 2 Months, 3 Weeks ago
I tried that and the Environment.Value("Dealer_Code") display correct value in a msgbox. However I still got the error msg on the next line

Code:
x=msgbox (Environment.Value("Dealer_Code"),0,"Wait Box")
Browser("Browser Name").Page("Page Name").Frame("fsbottom").WebList("Dealer Code").Select Environment.Value("Dealer_Code")
#4
Solved: 10 Years, 2 Months, 3 Weeks ago
check the variable type... I doubt you might be getting an integer value from environment variable.
Thanks,
SUpputuri
#5
Solved: 10 Years, 2 Months, 3 Weeks ago
Below is the syntax for Environment.Value("Dealer_Type")

Code:
Environment.Value("Dealer_Type")= DataTable.GetSheet("Sheet_Name").GetParameter("Dealer_Type")
Do you know the function/syntax that will convert to text
#6
Solved: 10 Years, 2 Months, 3 Weeks ago
As Supputuri mentioned, it looks like environment variable is not returning a string type.Try if this works.
Code:
Browser("Browser Name").Page("Page Name").Frame("fsbottom").WebList("Dealer Code").Select cstr(Environment.Value("Dealer_Code"))
#7
Solved: 10 Years, 2 Months, 3 Weeks ago
Hi ravi.gajul

This actually worked!!! what also worked is the following however it is more coding.

Code:
Dealer_Code = Environment.Value("Dealer_Code")
Browser("FundSERV Web Services").Page("FundSERV Web Services").Frame("fsbottom").WebList("Dealer Code").Select (Dealer_Code)

Thank you
#8
Solved: 10 Years, 2 Months, 3 Weeks ago
Closing the thread as the issue is resolved.
Thanks,
SUpputuri


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to get the list of items in Delphi Combobox Environment Object Raj Aryan Singh 3 1,959 02-04-2020, 12:32 AM
Last Post: Raj Aryan Singh
  how to get relative path by using testdir environment variable Sathyaprasad 1 1,779 11-30-2017, 02:21 AM
Last Post: supputuri
  environment variable path for qc automation2012 0 2,636 01-18-2015, 08:18 AM
Last Post: automation2012
  Array as an environment variable..... rachna_nags 7 12,759 11-07-2013, 08:25 PM
Last Post: ssvali
  Accessing Environment variable value in Library file vishruth143 1 2,479 09-07-2013, 05:11 AM
Last Post: jacosta

Forum Jump:


Users browsing this thread: 1 Guest(s)