I was wondering if anyone knew how to do the equivalent of 'keydown' and 'keyup' events with WebdriverIO? I currently have the following code:
// required pages
var LibraryPage = require('../../pageobjects/library.page.js');
describe('Delete Button', function(){
before(function (){
LibraryPage.open('/library/list/1/');
});
it('Delete button shows correct number of images', function (){
browser.keys('Ctrl');
LibraryPage.Image('asset1.jpg').click();
LibraryPage.Image('asset3.jpg').click();
LibraryPage.Image('asset5.jpg').click();
expect(LibraryPage.DeleteButton.getAttribute("title")).to.equal("Delete 3 assets");
});
});
// Library Page Object
DeleteButton: { get: function () { return browser.element('div[title^="TODO: Delete "]'); } },
Asset: { value: function(assetName) { return browser.element('tr*=' + assetName); } },
I want to hold the CTRL key while selecting images to multi-select.
What I have read indicates that the keys function should be sticky until it gets nulled out, but that’s not what I am experiencing.. Each item gets clicked without the CTRL button being held.
Using WebdriverIO v4 (synchronous JS). Any help would be much appreciated, thanks!