I have web application which uses certificate. I have .reg file for windows and linux to AutoSelectCertificateForUrls using below code-
Windows Registry Editor Version 5.00
When I run my .reg file and run my robot script in GUI mode in chrome browser and windows OS then it auto select certificate for my site.
When I am running that in headless mode , it is giving 403 and certificate is not getting auto selected even If I executed .reg file before robot script execution
I am trying headless mode because on linux there is no GUI.
Its blocker, any help will be highly appriciated.
You have a few more issues to worry about, and the .reg file not working in headless mode in windows is the least of them.
- your .reg files won’t work on Linux as linux doesn’t have registry, so this work around won’t help you there, so best to tackle this another way now, your going to need to anyway.
- Linux does have a GUI, actually it has several you can choose from actually (X11, Wayland, Android, to name some common ones), and you will need to as the browsers will crash if you don’t used one. For headless linux linux installs to run a browser in headless mode for test automation most, a common choice would be xvfb, which is what I suggest you use especially if you are planning to use something like docker.
My next question would be do you need to use the certificate, or would simply instructing the browser to ignore insecure certificates and continue on be enough?
I’m not an expert on setting browser options but I found this example of telling chrome to ignore certificate warnings that might be usefull? if you need to use the certificate then I image the process will be similar with a slightly different command line option)
Hope this helps,