I'm working on creating Selenium tests for a very large Polymer webapp.
The developers would prefer that I don't modify the actual app.
So instead I'm trying to inject the extra pieces I need to make this easier
using Javascript. I then want to inject this Javacript into the app using
Selenium, before running the actual test.
But so far, I'm just trying things in the console to see what works.
So, for example, I want to add a dynamic class to this for example:
<span id="value" class="io-editor" tabindex="0" spellcheck="false"
contenteditable></span>
If I actually go into the html, and add qasel_io-number_{{value}} as so:
<span id="value" class="io-editor qasel_io-number_{{value}}" tabindex="0"
spellcheck="false" contenteditable></span>
And I have for example the value of 7, I get the expected result of a class
named qasel_io-number_7
But I can't figure out how to do this dynamically after the fact.
Now I've tried a bunch of different ways to do this in javascript, both
with and without using JQuery.
Here's an example of just one of the ways I've tried it.
$("body /deep/ .io-editor").addClass("qasel_io-number_{{value}}")
(I've also tried variations of this using Polymer's $$, also to no avail).
The classes get added, but the double brackets and value are inserted
literally, instead of being "magical" properties.
How can I make {{value}} update automatically?
Thanks!
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/02f6cef5-4843-4314-971a-53ab0224aa11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.