title: Opening a browser in Robot Framework using Selenium with specific profile or extension permanently
body: <p>I  want to automate tests for a website using Robotframework and Selenium on Windows 10. Form the Robot framework  I need to pen  the browser (Chrome or Firefox)   using an extension ( using  SwitchyOmega or FoxyProxy extension).</p>
  <p>Robot Framework using Selenium  open in  Chromdriver or  geckodriver. However the  extension is  not here. I can manually add  the extension  on the opened browser. However it goes away when the  browser is closed  How to install  the extension permanently in the  Chromdriver or geckodriver, so it is there when I launch the chromedrive ror the geckodriver from selenium using the Robot Framework.</p>
  <p>While the SeleniumLibrary documentation technically explains this, its definitely not clear and took a lot of trial and error before I figured this out. Capabilities are options that you can use to customize and configure a ChromeDriver session. <a href="https://sites.google.com/a/chromium.org/chromedriver/capabilities" rel="nofollow noreferrer">https://sites.google.com/a/chromium.org/chromedriver/capabilities</a>  same at    <a href="https://chromedriver.chromium.org/capabilities" rel="nofollow noreferrer">https://chromedriver.chromium.org/capabilities</a> ). gives  unknown  keyword errors at the the Robot Framework
  Attempted the following</p>
  <p>Above  runs but does not give the  chrome browser with the desire results
  My environment and  browser set up is OK. I can open the browser   with my desired profile from the Windows command line</p>
  <p>&quot;C:\Program Files (x86)\Google\Chrome\Application\chrome.exe&quot;  --profile-directory=&quot;Default&quot;</p>
  <p>I can also  open the Firefox with desired profile  from te  Python/Selenim script .However I  can not use the ”, RF keywords  from the Robot Framework.  Same problem described at <a href="https://stackoverflow.com/questions/47814335/no-browser-is-open-issue-is-coming-when-running-the-robot-framework-script">&quot;No Browser is Open&quot; issue is coming when running the Robot framework script</a>  and  <a href="https://stackoverflow.com/questions/47814335/no-browser-is-open-issue-is-coming-when-running-the-robot-framework-script">&quot;No Browser is Open&quot; issue is coming when running the Robot framework script</a>.</p>
  <p>In summary , I  need help to  open a browser with desire profile or desired extension fro Robot framework .</p>
  <p>Here is my code.</p>
  <pre><code>*** Settings ***
      Library  SeleniumLibrary
      Library    OperatingSystem
  
  
  *** Variables ***
      ${Browser}  Chrome
      ${URL}     myurl 
  *** Test Cases ***
  User must sign in to check out
      [Documentation]  This is some basic info about the test
      [Tags]  Smoke
      ${chrome_options}=    Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys
      #Call Method    ${chrome options}    add_argument    incognito
      Call Method     ${chrome options}    add_argument    user-data-dir\=C:\\Users\\ts7237\\AppData\\Local\\Google\\Chrome\\User Data\\Default
      Call Method     ${chrome options}    add_extension   C:\\Users\\ts7237\\PycharmProjects\\first script\\Resources\\padekgcemlokbadohgkifijomclgjgif\\2.5.21_0.crx
      ${dc}   Evaluate    sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME  sys, selenium.webdriver
      ${Options}=    Call Method    ${ChromeOptions}    to_capabilities
      Create WebDriver    Chrome    chrome_options=${chrome_options}  desired_capabilities=${dc}
  
      Maximize Browser Window
      ${title}=  Get Title
      log many    ${title}
      # switching to new tab and do
      select Window  title= SwitchyOmega Options
      #${newtabtitle}=  Get Title
       ${title}=  Get Title
      log many    ${title}
      Go To       ${URL}
      close   Window  title= SwitchyOmega Options
  </code></pre>