I finally solved it!, thanks, @joel for nudge with the AutoIT library - in the end, that was the correct solution
It has a bit of complicated setup, so bear with me:
1.) First, we need to clone repo for AutoIT library:
2.) Once cloned, get inside the main directory and run: python setup.py install- this is necessary, otherwise when importing library into your RF it would state an import error, because of missing cache, details here:
3.) After that, go inside your RF and run from comand line: pip install robotframework-autoitlibrary
4.) Then just inside your testcase, import library into Settings:
Library AutoItLibrary
And use these two commands in Test Cases:
Send (“{ENTER}”)
Send (“{ENTER}”) - I have to confirm it twice, don´t ask me why, but I have to do it even when opening it manually. Also, it is enough for me to just confirm the certificate, since I have only one to choose from.
Good to hear it works. For AutoItLibrary, I didn’t need to clone the repo. I’m using the pypi.org repo and pip install found the correct version I needed.
Only problem is the 64bits version of the DLL. But the fix is already documented.
Another solution to this was to make use of a simple custom python library that runs the keywords in separate threads to allow for keywords to be run before the last one had been fully completed.
And then inputting keystrokes with RPA.Desktop to select the certificate after opening the page.
*** Settings ***
Library SeleniumLibrary
Library RPA.Desktop
Library PythonThreadingLib.py
*** Variables ***
${URL} https://example.com
*** Test Cases ***
Bypass Select Certificate
Open Browser browser=Chrome
${thread1}= Run In Thread Go To ${URL}
Sleep 2s
${thread2}= Run In Thread Press Keys enter
Wait For Thread ${thread1}
Wait For Thread ${thread2}
Close Browser