nightmare
nightmare copied to clipboard
Different test behaviour when using openDevTools
I'm experiencing some different behaviour when using nightmare with devTools open, and when devTools are not open.
I have an input field with autosuggestion(twitter typeahead) where I enter some data and select from the suggestions. Here is the relevant code:
.type('.input-field', 'test')
.focusInput('.input-field')
.wait('.tt-suggestions')
.click('.tt-suggestion')
Custom focusInput action:
Nightmare.action('focusInput', function ( selector, done ) {
this.evaluate_now(( selector ) => {
document.activeElement.blur();
var element = document.querySelector(selector);
element.focus();
}, done, selector );
});
When using openDevTools with nightmare, this works perfectly. The suggestions are displayed and I can select it. However, without having devTools open, the suggestions don't even appear.
Has anyone experienced something like this before?
I am seeing similar behavior. Clearing text doesn't work unless openDevTools is set to true.
Having opposite problem; my test works fine with devTools closed but when open it fail.
'input' focus seems to not be correct if devTools is open.
(in both cases, show
is set to true
)