I'm not sure about just classes, but it seems like injectBoundHTML might be useful?
Max. On Sat, 20 Jun 2015 at 06:13 <[email protected]> wrote: > Oh, I should probably add that the app is using version 0.5.5 of Polymer, > just in case that matters. > > And at least for now, it's okay if the solution works only in > Chrome/Chromium (although something cross browser would of course be even > better). > > > On Friday, June 19, 2015 at 10:04:51 PM UTC-7, [email protected] wrote: >> >> 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/94b2f6fc-4732-4959-98c5-e4d89e724336%40googlegroups.com > <https://groups.google.com/d/msgid/polymer-dev/94b2f6fc-4732-4959-98c5-e4d89e724336%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > 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/CAMZCrPhgZYwVvJ_SaPr887V1A%2BTtJQMMyPm4s%3DBZt_81wSBx2w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
