1

I cannot click the option from select element in Safari 11. I also test in the other browsers, and with Chrome, Firefox and IE I don't have this problem. I'm writing tests in Nightwatch 0.9.19, running them on BrowserStack.

On Chrome works simple click on element or keypress:

this.click('[data-qa="select-day"] select', () => {
        this.api.keys(['\uE015'], () => {
            this.api.keys(['\uE006']);
        });
});

So I'm looking for the solution specifically for Safari 11. I was trying advices from:

Nightwatch Cannot Find/Click on Dropdown Option

And all of the combinations with click and pause are not working. After clicking select element, pressing keys and clicking elements doesn't cause any action - view stays like that:

Maybe someone knows how to select option using plain js in Safari 11? Following code is also not working for me:

this.api.execute(function(){
        const selectDatePicker = document.querySelector('[data-qa="select-day"] select');
        selectDatePicker.selectedIndex = 2;
    })
Cerbia
  • 51
  • 1
  • 7

0 Answers0