0

Unable to get the Xpath for the Grammarly extension which has been added into chrome browser as an extension.

In the screen shot below , I am using GMAIL , but you can use any other website like https://www.memonotepad.com/ to check for the grammarly extension

Here I need to identify the number of spelling mistakes present in the text entered, could you please let me know the Xpath for the grammarly extension(red circle) which is present

Screen shot of grammarly extension

1
  • If you are unable to find the particular element it can be in another frame or XPath can be incorrect. For XPath help use with SelecorsHub Chrome Extention. The other problem can be solved by switching the frame. Check this out
    – pr96
    Commented Nov 25, 2022 at 13:48

1 Answer 1

1

This element is inside a shadow root. Xpath is not supported here. We should use css selector and access it through its host element and the shadow root.

To know more about this follow this url: https://cosmocode.io/how-to-interact-with-shadow-dom-in-selenium/.

The site gives clear instructions on how to access elements inside a shadow root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.