I am using robot framework 4.1.3 with Pycharm and chrome browser and Windows 10 machine. How do I select a certificate in this browser window?
This is kind of blocker in automation execution in robot framework…
I am using robot framework 4.1.3 with Pycharm and chrome browser and Windows 10 machine. How do I select a certificate in this browser window?
This is kind of blocker in automation execution in robot framework…
Have you considered press keys ${None} enter
?
@leeuwe Yes… I have tried
Press Key ${None} ENTER
Press Keys ${None} ENTER
press keys ${None} \ue007 (ascii for enter)
nothing worked for me
To solve above issue I am trying to click OK button of certificate using SikuliLibrary
But I did not get success.
I have installed -
pip install robotframework-SikuliLibrary
Added below code. Any help would be highly appreciated
I tried below multiple ways but not getting any luck to select certificate-
Sleep 5s
${message}= Handle Alert action=ACCEPT timeout=2s
Press Keys ${None} ENTER
Press Keys ${None} \\13
Press Key css=body \\13 # ASCII code for the Enter key
Press Key css=body ENTER
Press Key xpath=//body ENTER
Press Key xpath=//body \\13
Press Key xpath=//body enter
Press Tab
Press Tab
Press Enter
Also tried to install SendKeys package to use below code but failing package installation -
import SendKeys
def send_enter_key():
"""
Sends ENTER key to application
Works only in Windows
"""
SendKeys.SendKeys("{ENTER}")
I tried below registry code as well. I am using window machine-
Windows Registry Editor Version 5.00
HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\AutoSelectCertificateForUrls\1 = {“pattern”:“https://[*.]gov.us”,“filter”:{“ISSUER”:{“CN”:“AC Representacion”,“SUBJECT”:{“CN”:“Y4795129B ALESIA LEE PINNEY (R: B67140871)”}}}
or
Windows Registry Editor Version 5.00
Software\Policies\Google\Chrome\AutoSelectCertificateForUrls\1 = {“pattern”:“https://[*.]gov.us”,“filter”:{“ISSUER”:{“CN”:“AC Representacion”,“SUBJECT”:{“CN”:“Y4795129B ALESIA LEE PINNEY (R: B67140871)”}}}
or
Windows Registry Editor Version 5.00
HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\AutoSelectCertificateForUrls\1 = {“pattern”:"*",“filter”:{}}
Not able to see entry under chrome://policy after this
Finally got solution after lots of attempts -
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\AutoSelectCertificateForUrls]
“1”="{“pattern”:"*",“filter”:{“ISSUER”:{}}}"
Code to auto select certificate for website finally worked for me.
Can anyone help, how to call that .reg file or code in robot framework?
Can we call this in Suite Setup or Test Setup or is there any other way to run this silently ?
Hi @bk-user,
see Not able to run .reg file in robot framework - #2 by damies13 in your other topic.
Dave.
Tengo el mismo inconveniente ¿Cómo solucionar?