I am running the following code (Java selenium client)- PAGE_NUMBER has a value, but I am unable to get it using selenium:
String script = "var cellValue = selenium.browserbot.getUserWindow().PAGE_NUMBER;";
selenium.runScript(script);
String value = selenium.getEval("selenium.browserbot.getUserWindow().cellValue;");
System.out.println("Value: " + value);
I don’t know Selenium 1 at all and Selenium2/Webdriver is very different. However there are three things that I suspect to play a role in this issue:
var). You might try using a global variable by omitting thevarkeyword, so that you can access it later.selenium.browserbot.getUserWindow().. Try omitting this part.And then again, why not simply using
?
I hope at least some part of this answer helps you. As I said I am just guessing.