I wrote a few tests with nightwatch that look like this:
'Test Toggles': function (client) {
client
.assert.attributeEquals("#enableEmptyString", "value", "false")
.click("#enableEmptyString").pause(100)
.assert.attributeEquals("#enableEmptyString", "value", "true")
}
The toggles look like this:
<div class="checkbox checkbox-slider-primary checkbox-slider checkbox-slider--b checkbox-slider-md">
<label>
<input class="toggleBoolean" id="enableEmptyString" type="checkbox" name="configurationProperties.enableEmptyString" value="false">
<span></span>
</label>
</div>
These work fine when I use the default client (firefox) but if I switch to Chrome the toggles are not clicked. What is a better way to do this that is client agnostic?