Nick's Tech Blog: Selenium Testrunner - stored variables aren't being saved

Pages

Friday, June 10, 2011

Selenium Testrunner - stored variables aren't being saved

Problem

Currently stored variables in javascript, aren't accessible from other tests.

There's an open JIRA for this issue - http://jira.openqa.org/browse/SEL-605

Solution

Until this gets assigned a fix version, I'm currently using the following workaround, which stores global variables using javascript:

getEval | user="whatup";

then in a separate test...

type | j_username | javascript{user}

This works in Selenium IDE, and Test Runner.

Tracebacks:
http://jira.openqa.org/browse/SEL-605
http://www.nickbartlett.com/wordpress/selenium-testrunner-variables-dont-work/

No comments:

Post a Comment