My knowledge of Selenium 1 is limited, and Selenium 2/Webdriver is quite different. However, there are a few key points that may be contributing to the issue you're facing:
- Variable Scope: It seems like the variable is declared locally within the script using
var
. Consider defining it as a global variable by omitting var
so that it can be accessed later.
- Accessing Variable: Is there a specific reason for trying to access the variable through
selenium.browserbot.getUserWindow().
? Removing this part might help resolve the problem.
- Semicolon Placement: The semicolon after cellValue could be causing issues. Try removing it.
Alternatively, have you considered simply using:
String value = selenium.getEval("selenium.browserbot.getUserWindow().PAGE_NUMBER");
?
I hope that some aspect of this response provides assistance. Please keep in mind that these suggestions are speculative rather than definitive solutions.