You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
element click intercepted: Element <input id="product" class="ant-input" placeholder="Product" type="text"> is not clickable at point (813, 212). Other element would receive the click: <label class="placeholder-label placeholder-label--select" for="product">...</label>
(Session info: headless chrome=80.0.3987.116)
But another test is broken, this time relates to this commit d8adafd
I have input with autocomplete. (ant dropdown)
You click input, start typing and then you can choose localization.
Problem is that input immediately looses focus after setValue(), div with autocomplete options won't appear and you can't choose localization.
There is no behat error, just scenario fails.
$page = $this->getSession()->getPage();
$el = $page->find('css', 'input#localization');
$el->click();
$el->setValue($localization); /* Here focus is lost */$page->waitFor(15, staticfunction () use ($page) {
$elements = $page->findAll('css', '.localization-option');
return ($elements && $elements[0]->isVisible());
});
$el->keyPress(13);
What fixes it is removing code added in this commit or adding long sleep(); after $element->postValue(array('value' => array($value)));
so there is enough time to get localizations from db.
What fixes it is removing code added in this commit or adding long sleep(); after
$element->postValue(array('value' => array($value)));
so there is enough time to get localizations from db.
If you have dynamically loaded element then you need to wait for it to load before trying, same behavior may have your customers.
Check this example https://ant.design/components/auto-complete/
When selenium finishes typing in input it looses focus, so it can't click in option in dynamic div because div won't appear.
Well, setValue is about setting the value of a field, not about typing in a field while keeping focus (which was already not working in 1.3.0). The Mink expectation is that after you set the value of a field, the change event is triggered, and that won't happen if we only write in it without moving focus away.
There is an in-progress discussion about adding a separate API in Mink to be able to type in an element without moving focus away, to allow testing autocomplete elements, but that's not what setValue is about.
Activity
stof commentedon Mar 20, 2020
Can you share a reproducing case ?
athanro commentedon Mar 20, 2020
Can't share url, but can this html
It's select with checkboxes (https://ant.design/components/select/)
oleg-andreyev commentedon Mar 20, 2020
From provided exception and HTML it seems that label is covering element, try adding z-index to input element
athanro commentedon Mar 23, 2020
Adding z-index fixed this problem.
But another test is broken, this time relates to this commit
d8adafd
I have input with autocomplete. (ant dropdown)

You click input, start typing and then you can choose localization.
Problem is that input immediately looses focus after setValue(), div with autocomplete options won't appear and you can't choose localization.
There is no behat error, just scenario fails.
What fixes it is removing code added in this commit or adding long sleep(); after
$element->postValue(array('value' => array($value)));so there is enough time to get localizations from db.
oleg-andreyev commentedon Mar 24, 2020
If you have dynamically loaded element then you need to wait for it to load before trying, same behavior may have your customers.
athanro commentedon Mar 24, 2020
Check this example https://ant.design/components/auto-complete/
When selenium finishes typing in input it looses focus, so it can't click in option in dynamic div because div won't appear.
stof commentedon Mar 24, 2020
Well,
setValueis about setting the value of a field, not about typing in a field while keeping focus (which was already not working in 1.3.0). The Mink expectation is that after you set the value of a field, the change event is triggered, and that won't happen if we only write in it without moving focus away.There is an in-progress discussion about adding a separate API in Mink to be able to type in an element without moving focus away, to allow testing autocomplete elements, but that's not what
setValueis about.