Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Constants
#1
Solved: 11 Years, 4 Months ago
i declared constant
const browser="www.gmail.com"
while calling
systemutil.run browser
i m getting error like Name redefined:'Browser'

why im getting such error even though i have just assigned once
please help

thanks
Reply
#2
Solved: 11 Years, 4 Months ago
You cant use reserved keywords in QTP for declaring the variables.
Browser is a reserved keyword which is suppose to denote a web browser. Similarly you cant use page, dialog etc,.

Also, your code is wrong,

Try,

Code:
const mybrowser = "GMAIL.COM"
Systemutil.Run "iexplore.exe", mybrowser
Reply
#3
Solved: 11 Years, 4 Months ago
thanks alot got it
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  constants in qtp diya 7 6,722 12-07-2012, 10:28 PM
Last Post: diya

Forum Jump:


Users browsing this thread: 1 Guest(s)