Question

What is the best way to test items dynamically created? I don't want to use classe, so can change in the future, and Ids are dynamically created by knockout, I'm using a custom attribute and then

xpath=(//input[@section-id="entry_input"])[1]

Is this a bad practice? thanks in advance I´m new on stackoverflow.

No correct solution

OTHER TIPS

I think you are better off testing the ViewModels, we do this in our my current project (Enterprise scale) and it works very well, very few bugs.

We use Qunit for our tests but Jasmine works too. Most bugs occur in the ViewModels and if you have advanced custom bindings you can test them seperate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top