MinkSelenium2Driver icon indicating copy to clipboard operation
MinkSelenium2Driver copied to clipboard

Click on element behind top fixed menu

Open fauger opened this issue 7 years ago • 1 comments

Reproduction case :

We have a top fixed menu (position: fixed; top: 0; left: 0; right: 0;)

  1. When i want to click on specific element outside the view screen (clickOnElement(Element $element) in Selenium2Driver.php)
  2. Selenium move to my element : $this->wdSession->moveto(array('element' => $element->getID()));
  3. Then this element goes to the top of the view screen behind my fixed menu.
  4. The click is catched by the menu and the following error is throwed : Element <details data-drupal-selector="edit-markets-fr" id="edit-markets-fr" class="js-form-wrapper form-wrapper collapse-processed"></details> is not clickable at point (480, 15.466659545898438). Other element would receive the click: <nav data-offset-top="" id="toolbar-bar" role="navigation" aria-label="Éléments de la barre d'outils" class="toolbar-bar clearfix"></nav>

Please, How can i fix it ? Actually the only solution i see is hacking the function clickOnElement and adding the height of my menu.

Any helps greatly appreciated, thank you.

fauger avatar Mar 01 '18 17:03 fauger

No way really without breaking DriverInterface API that this and other drivers implement.

Maybe you can just hide the top menu before clicking on everything else?

aik099 avatar Mar 01 '18 19:03 aik099