Question
I want to access some websites using selenium(Python) and headless-firefox with Self-Signed certificate.
When I use FireFox Browser instead of selenium and headless-firefox, I could realize this as the following:
- prepare Self-Signed certificate
- Import it intor FireFox Browser like this
- access websites using imported Self-Signed certificate
I want to do the same thing using headless-firefox and even using selenium(Python), but I have no idea.
Can anyone teach me if this is possible and if so, how?
Additional Information
- headless firefox: https://ftp.mozilla.org/pub/firefox/releases/117.0/linux-x86_64/en-US/firefox-117.0.tar.bz2
- selenium: 3.141.0
I solved by myself.
To realize this, we can use policies.json
Create a file named
/opt/firefox/distribution/policies.jsonin the Firefox installation directory (eg./opt/firefox). The directory depends on OS