I successfully got Selenium tests to work with my Chrome extension. But still I have an issue where the ID of the extension should be received through the Chrome API.
Why do I need that? Since the project is within Git I want to ensure that my code buddy can run the tests without configuring much. Everything works fine BUT the ID for the extension differs from every machine.
My ID is:
chrome-extension://dafanlbggefkfnbekjceijjhgcancpik/html/options.html
What do I need? To receive this ID dynamically I need access to chrome.runtime.id
. Which is not trivial since the Chrome API is not accessible for me within my Selenium test code.
var extensionID = chrome.runtime.id;
var urlToOptionsPage = 'chrome-extension://'+ extensionID +'/html/options.html';
That's what I actually want to achieve so my Selenium tests can open the proper locale extension URL.
Does anybody have a clue what I need to do within the manifest.json
or within Selenium configs or another workaround?