Webelements inside the vue.js's fragment are not visible to Selenium webdriver

55 views
Skip to first unread message

Brantan SP

unread,
Jul 21, 2021, 5:14:42 AM7/21/21
to Selenium Users

vue.js uses a concept called Fragments to create more than one root node in a Vue component. This is done for Accessibility support which is necessary to allow assistive technology like screen readers to interpret web pages and applications, More about this in -> https://blog.logrocket.com/fragments-in-vue-js/

So, basically they are creating HTML tag that would not read as a node by the DOM and called it fragments.

Hence the webelements inside such fragments are not visible for Webdriver. This is more or less like a iframe inside html page where we do switchToIFrame and interact with it. Only that for Fragments there are no ways to make it visible to the webdriver.

PFA Screenshot of DOM snapshot containing the Fragment.

The same issue was already reported in this ticket - #7709

Capture.PNG
Reply all
Reply to author
Forward
0 new messages