I've written a command in Nightwatch to test a takeover element. The test works fine in Chrome only it does NOT in Edge.
What i've noticed is that the click function on the first two anchor elements is not triggered. If i manually click them it closes them as expected. The click event does work on the button elements which are lower in the DOM.
Here's my command:
exports.command = function(client) {
client.elements('css selector', '[data-action="takeover"]', function(elements) {
elements.value.forEach(function(element){
client.elementIdAttribute(element.ELEMENT, 'data-rel', function(attribute) {
client
.click('css selector', "[data-rel='"+attribute.value+"']")
.waitForElementVisible(''+attribute.value+'', 5000)
.collapsibleInTakeover(attribute.value, client)
.keys(client.Keys.ESCAPE)
.pause(250)
.waitForElementNotVisible(''+attribute.value+'', 5000)
});
});
});
return;
};
Aucun commentaire:
Enregistrer un commentaire