I am interested in using Selenium Nodes to install and interact with a Chrome Extension on a Chrome browser. Has anyone had any success with this before?
I haven’t yet come across any KNIME specific solutions that can install & interact with Chrome Extensions using Selenium Nodes, but it seems there are other ways to do this in other platforms. I would be very grateful for some guidance, or possibly even an example workflow of how others have solved this issue(!).
Here are 4 basic examples for how I would like to use Selenium Nodes with a Chrome Extension. Example Chrome Extension here is Requestly.
interesting project – to my surprise, it seems indeed possible to interact with Chrome plugins using Selenium (I didn’t know that so far).
First, to get started, I would probably initially set up the local Chrome installation with the plugin already installed, and then start Chrome using this very profile (instead of a fresh one). While I generally do not recommend this in regards to reproducible workflows, it is fine for some initial proof of concept. Here’s an example workflow which uses a persistent profile:
Later, if you want to start a fresh browser and install an extension into it dynamically, this should be possible with the current “capabilities” configuration in the WebDriver Factory or Start WebDriver already. The crucial part is, that you’ll need to attach the extension file Base64-encoded (the Base64 Encoder might come in handy) and dynamically build a JSON snippet which includes this encoded string. (in fact, the example workflow above does something similar for setting the profile config)
For the actual interaction with the browser extension, the link you mentioned above should be helpful and you should be able to map this 1:1 to existing Selenium nodes (Navigate, Find Elements, Click, …)
Until here, all this should be possible without writing custom Java code and using the mentioned extension points. If you still want to explore these possibilities and you have any questions, don’t hesitate to get back to me (here or via mail@seleniumnodes.com). The extension points were built for a specific customer project a while ago, but I’m not aware that someone actually made use of these, so I’d be eager about any feedback, etc.
Best,
Philipp
PS: Out of curiosity and if you want to tell, why do you need to interact with this browser extension?