Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Install extension with API key in Selenium

  • Kòsí àwọn èsì
  • 0 ní àwọn ìṣòro yìí
  • 16 views
more options

Hello, I'm trying to install firefox extension on selenium headless browser but I need to configure the extension to use an API key. The documentation of the extension says that I need to download the xpi file, extract the contents and to overwrite one of the js files and to hardcode the API key inside and compress it back to xpi but when I do that I'm getting error that the file is corrupt because when I change the file I'm breaking the add-on signing. I also tried to navigate to about:addons and put the code there in the preferences tab of the extension but I can't interact with input field for the API key. Is there a workaround for this? I went trough the code of the extension and I see that this key is saved in the extension local storage is there a way I can interact with this storage outside of the extension when I set up the browser driver? Any help will be appreciated. I'm using python-selenium 3.141.0

Hello, I'm trying to install firefox extension on selenium headless browser but I need to configure the extension to use an API key. The documentation of the extension says that I need to download the xpi file, extract the contents and to overwrite one of the js files and to hardcode the API key inside and compress it back to xpi but when I do that I'm getting error that the file is corrupt because when I change the file I'm breaking the add-on signing. I also tried to navigate to about:addons and put the code there in the preferences tab of the extension but I can't interact with input field for the API key. Is there a workaround for this? I went trough the code of the extension and I see that this key is saved in the extension local storage is there a way I can interact with this storage outside of the extension when I set up the browser driver? Any help will be appreciated. I'm using python-selenium 3.141.0

O gbọ́dọ̀ wọlé sí àkọ́ọ́lẹ̀ re láti fèsì àwọn ìfọ̀rọ̀ránṣẹ́. Jọ̀wọ́ bẹ̀rè ìbéèrè titun, bí o kò báìtí ní àkọ́ọ́lẹ̀ náà.