How to save a value in Selenium-RC (via PHPUnit) and then access / access it later using PHPUnit?
Suppose I run the following command in test mode:
$this->storeExpression( "foo", "bar" );
If I understand the Selenium API documentation correctly, I could access this data using javascript{storedVars['foo']} using the good Selenese style. It must contain the value "bar" .
My question is this: how can I access this javascript{storedVars['test']} expression (or, more generally, javascript{storedVars} in PHPUnit?
For example, here is a simple test that I performed:
public function testStorage() { $this->open('http://www.google.com/'); // for example $this->storeExpression( 'foo', 'bar' ); $foo = $this->getExpression('foo'); echo $foo; }
The output is "foo" (among other standard PHPUnit output), while I expect it to be a "bar". It just returns me the name of the expression, not its value.
Can anyone with experience with this give me some guidance?
source share