simond
simond

Reputation: 774

robot framework-unable to select a certificate in the browser pop up window

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?

enter image description here

I tried below multiple ways:

   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 to add registry entry and able to see entry added in registry but still it is asking to select certificate in chrome browser

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\AutoSelectCertificateForUrls]
"1"="{\"pattern\":\"www.web.com\",\"filter\":{\"ISSUER\":{\"CN\":\"AC Representacion\"}}}"

Is there any option in robot framework to auto select certificate in chrome browser? or auto set certificate for website url? or set during driver launch?

Upvotes: 1

Views: 1235

Answers (1)

simond
simond

Reputation: 774

Below is correct answer after lots of attempts -

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\AutoSelectCertificateForUrls]
"1"="{\"pattern\":\"*\",\"filter\":{\"ISSUER\":{}}}"

Upvotes: 1

Related Questions