rpaframework
rpaframework copied to clipboard
Add keyword to install browser extensions to Selenium
Python example of the how Firefox extension can be installed
@keyword
def firefox_install_addon(self, path, temporary=None):
# 'path' is absolute path to the addon that will be installed
payload = {"path": path}
if temporary:
payload["temporary"] = temporary
# The function returns an identifier of the installed addon.
# This identifier can later be used to uninstall installed addon.
return self.driver.execute("INSTALL_ADDON", payload)
Sounds good, I'm also thinking on enabling support for installing extensions given all combinations between: (Playwright, Selenium) X (Chrome, Firefox)
so people can install them without extending the libraries or doing any hacks.
ToDo
- [ ]
Use Extension
keyword (open to other naming) for the following:- [ ] Installing the addon with Selenium + Firefox (on Chrome you add it as an
option
) - [ ] Opening the browser with Playwright + Chrome/Firefox (adding as CLI param which extension you want to load)
- [ ] Installing the addon with Selenium + Firefox (on Chrome you add it as an
- [ ] Portal example showcasing how this works with a real extension in both Selenium & Playwright with Chrome/Firefox. (bot will be non-headless first and headless too if supported)
- [ ] Improve Portal LastPass bot for Selenium case as well and check if Chrome still has trouble loading extensions in headless mode.
- [ ] Spread the word in the community Slacks/forums related to this problem.