Use Already Running Browser

Hi All,

ideally we use Open Browser, Open Available Browser which opens a new Browser. in my requirement I want to use a browser which is already been launched and the browser will be Firefox.

Normally in other RPA tools we have option like attach but in Robocorp we have this option only with Chrome and not for others.

Please let me know if there is any work around.

Thank you!

It is not officially supported by Robocorp, so there is several steps:

  1. start firefox with command line option --marionette
  2. Download geckodriver and place it somewhere in the PATH (e.g. robot root in default config)
  3. Start your Selenium driver with extra options
*** Settings ***
Library  RPA.Browser.Selenium

*** Tasks ***
Minimal task
    ${service_args}=     Create List    --connect-existing    --marionette-port=2828
    Create Webdriver     Firefox        executable_path=geckodriver   service_args=${service_args}
    Go To   https://robocorp.com
1 Like

Hi Teppo,

Thanks for the prompt reply. I did use your code as it is but getting below error - I am not sure if something needs to be modified.

Exception has occurred.

Suspended due to logged failure: TimeoutException: Message: No connection could be made because the target machine actively refused it. (os error 10061)

Make sure that when you use @Teppo 's suggestion that when you start Firefox with command line option that it is first instance of Firefox started. At least Chrome options do not have any effect unless given for the first instance of the Chrome.

Thanks for the clarification Mika! I followed the same steps but unfortunately getting the same error.

What was the command line you used to start the firefox?
Where is your geckodriver (or geckodriver.exe) located?
Do you have e.g. a firewall running in your computer that may block the connection?