Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

exactBinding fails to locate bindings which contain certain characters #1918

Closed
chris-putnam opened this issue Mar 11, 2015 · 0 comments
Closed
Assignees
Milestone

Comments

@chris-putnam
Copy link

bindings which use characters that have special meaning in regular expressions will fail to work in By.exactBinding - the binding needs to be escaped before matching. It is deceiving because of the way you have the argument described:

@param {string} binding The binding, e.g. {{cat.name}}.

Example:

<span>{{ vehicle.garagingTerritory.name() }}</span>

passing in 'vehicle.garagingTerritory.name()' to By.exactBinding will not match the element. You must at least escape the parenthesis. I would suggest escaping all of the input automatically, or adjusting the documentation to describe when the user needs to escape the input themselves.

Thanks

@juliemr juliemr added this to the 1.X milestone Mar 11, 2015
@sjelin sjelin self-assigned this Mar 16, 2015
sjelin added a commit to sjelin/protractor that referenced this issue Apr 27, 2015
@sjelin sjelin closed this as completed in 3cded9b May 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants