Robot framework-unable to allow a certificate in the browser pop up window

Hello everybody,

I am using Process and FlaUILibrary with Python in Robot Framework and I cannot confirm/allow or make this window disappear, which blocks my progress:
02

How can I confirm or make this certificate window not to pop-up at all?

Before you gonna ask:

Neither of them worked for me, even if I added that file manually.

  • I tried to select that OK in the certificate window button with FlaUI - no success
  • I have also tried to add into Test Setup Browser.New Context ignoreHTTPSErrors=True - did not help

Any help with this would be appreciated.

Hello, did you try with AutoITLibrary or FlaUiLibrary ?

Hello joel,

Yes, I have tried FlaUiLibrarym as I written - no avail
AutoITLibrary seems quite outdated and problematic, judging from the other posts

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.

And that´s it, finally I can move forward :slight_smile:

1 Like

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.

1 Like

Hello!

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.

Below is what worked for me :slightly_smiling_face:

import threading
from robot.api.deco import keyword, library
from robot.libraries.BuiltIn import BuiltIn

ROBOT_AUTO_KEYWORDS = False

@library
class PythonThreadingLib:
    
    @keyword
    def run_in_thread(self, keyword, *args):
        thread = threading.Thread(target=self.run_keyword, args=(keyword, *args))
        thread.start()
        return thread
    
    def run_keyword(self, keyword, *args):
        BuiltIn().run_keyword(keyword, *args)
    
    @keyword
    def wait_for_thread(self, thread):
        thread.join()

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
1 Like

Hello Endo,

That is an interesting solution, I will try to point it out in our project, multithreading might solve some other problems we might run in the future :slight_smile: