protected function getSubmenuLinkNode(NodeElement $first_level_item, string $link_text)
    {
        $second_level_items = $first_level_item->findAll('css', 'ul li a');
        $submenu_link_node  = null;

        foreach ($second_level_items as $second_level_item) {
            $current_item_name = Util\stripTagsAndContent($second_level_item->getHtml());

            if (strtolower($link_text) !== strtolower($current_item_name)) {
                continue;
            }

            $id = $first_level_item->getAttribute('id');

            try {
                $element_exists = $this->getSession()->evaluateScript(
                    'return document.getElementById("' . $id . '");'
                );

                if ($element_exists !== null) {
                    // "Focus" (add hover class) on the toolbar link so the submenu appears.
                    $this->getSession()->executeScript(
                        'document.getElementById("' . $id . '").classList.add("hover");'
                    );
                }
            } catch (UnsupportedDriverActionException $e) {
                // This will fail for GoutteDriver but neither is it necessary.
            }

            $submenu_link_node = $second_level_item;
            break;
        }

        return $submenu_link_node;
    }