Variable issues with UFT
Category:
Question ID: 109099
1
0

I’m trying to set a variable to a specific browser page, but I am getting a General Run Error when trying to run my test. Code example:

set page = Browser("browser").Page("page")
page.WebButton("Submit").Click

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on July 29, 2019 4:17 pm
19 views
Answers (1)
0
Private answer

The variable you are trying to use, ''page'' is a reserved word. Reserved words cannot be used as varibles. Try changing it to MyPage or something like that.

For this and additional rules and guidelines, please see the [UFT Help Center article][1].

[1]: https://admhelp.microfocus.com/uft/en/14.50-14.53/UFT_Help/Content/User_Guide/vbscript_rules_guideines.htm

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on July 29, 2019 4:17 pm
0
We changed it as you suggested an now it works. Thanks for the information.
( at July 29, 2019 4:17 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top