Skip to content

Shadow DOM Support in Robot Framework Selenium Library 3 for testability of Google Polymer Web Components #1472

@ReactRedux

Description

@ReactRedux

Our application is built with Google Polymer 0.5 Web Components. In most of the pages, we are having Shadow DOMs. Multi-level Nested Shadow DOMs are also available in many pages. Depth of the Shadow DOM is from 5 to 8 levels. Now we are trying to set up end-to-end automation testing for this Google Polymer application. We are using the latest version of Selenium Chrome Webdriver along with Robot Framework and Selenium Library to automatically test the Google Polymer web pages. But Robot Framework Selenium Library is unable to simulate mouse click events especially on the web elements that are residing within multi-level nested Shadow DOMs. Robot Framework Selenium Library is able to simulate mouse click events on web elements that are residing in the Shadow DOM with a depth of 1 or 2 levels. But further down the level (For instance :- web element residing in 5th level Shadow DOM), Robot Framework Selenium Library is able to locate the elements but unable to trigger simulated mouse click events on the web elements available within multi-level nested Shadow DOMs. While attempting to trigger simulated mouse click events on web elements residing within multi-level nested Shadow DOMs, "Move Target Out Of Bounds" exception is thrown at run time. This exception is usually thrown when the specific element is out of browser view port. But this element (which is a Google Polymer "core-icon" component) is in the browser view port and also clearly viewable in the page. Googling confirmed that Shadow DOM support is not provided by Robot Framework Selenium Library. Workaround specified in some of the forums "document.querySelector('selector').shadowRoot" did not work as expected, as this Google Polymer panel (which contains the "core-icon" component) is dynamically injected at run time. So executing "document.querySelector('panelSelector').shadowRoot.querySelector('coreIconPanel')" in Chrome browser console is returning null. Since this became a major showstopper in setting up our end-to-end automation testing with Robot Framework Selenium Library, please provide details on when the Shadow DOM Support will be added in Robot Framework Selenium Library for the testability of Google Polymer Web Components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions