Variable issues with UFT

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: 328, Answers: 10)
Asked on July 29, 2019 4:17 pm
1 views
Answers
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: 16, Answers: 738)
Answered on July 29, 2019 4:17 pm
We changed it as you suggested an now it works. Thanks for the information.
( at July 29, 2019 4:17 pm)