So, yes, I tried to locate suggestion magic box by css selector in Selenium, tried to send DOWN key to select suggested values, tried to find element's tag by JavaScript but nothing helps. All that I found is that element lay somewhere here.
div[class='magic-box-suggestion coveo-omnibox-selectable']
But trying to get all children from that element return 0 elements. I tried to Google that problem, but didn't found anything.
I've got a solution! Here we are:
This code returns
List<WebElement>that contains allspanelements in Coveo's magic-box-suggestions.This JavaScript code helped me to find a locator for Coveo's autosuggestion query. Just execute this in the browser's console.