How can I access browser extension's popup using selenium? How can I access browser extension's popup using selenium? selenium selenium

How can I access browser extension's popup using selenium?


How can I access browser extension's popup using selenium?

It's not possible. Selenium supports interaction with web view only.

What you can do with Selenium and extension for sure is automatic installation: https://stackoverflow.com/a/16512012/2517622

You may try to use desktop automation tools (e.g. White on Windows platform) for clicking on extension popup but it's not that easy and it's not platform independent as Selenium.


Here is the workaround we came up. Unless someone posts here the "right" solution I will consider this as the best approach.

So eventually, our extension is an iframe which just loads a page content from our website + does some other neat stuff. We simply open that url in a new tab and do regular selenium tests.

Side not: we have considered to write a little javascript wrapper to be able to access ext via main window through javascript. E.g. there is some js in ext that listens to main window's events and perform certain actions. Tho, it is too much efforts and doesn't really sound like a proper acceptance test so we discarded this approach.