playframework / playframework/play1
Selenium variables not working
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 671
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
Report here
Hi all
I've just tried to upgrade Play! Framework version in my old Play! 1.x
project using Selenium tests from 1.2.x to 1.3.x (or 1.4.x) and found
that Selenium variables do not work in any Play! 1.3.0+ version.
In Play! selenium test variable must be declared with square brackets
$[var] instead of braces ${var}. Selenium requires braces.
Selenium libraries in 'testrunner' plugin ('selenium-api.js' file)
contained Play! "fix" replacing braces with square brackets:
// Find all of the matching variable references
var match = stringResult.match(/\$\[\w+\]/g);
In 1.3.0 Selenium code in 'testrunner' plugin was upgraded, but without
the fix, so since 1.3.0 this line looks like:
// Find all of the matching variable references
var match = stringResult.match(/${\w+}/g);
Braces cannot be used because Play! with try to fill values when
rendering test template.
Did anybody find it before? Is there already an issue? The fix would be
trivial (see above).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the testrunner plugin's selenium-api.js and inspect the variable-reference matching regex described in the issue. Compare it with the pre-1.3.0 behavior, then verify that Selenium variables using braces work without Play! template substitution interfering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100