title: VBA + Selenium keep open Edge browser after test
body: <p>Currently I use selenium webdriver to login to a website and send text with VBA macro. The problem is that at the end of the macro the browser closes. Is there a way to keep open edge browser after the macro is finished?</p>
  <p>Any help is appreciated.</p>
  <p>Selenium basic 2.0
  Windows 10
  Excel 2010
  Edge browser</p>
  <p>This is my code:</p>
  <pre><code>Sub Repsol()
  
  Dim driver As New WebDriver
  Set driver = New EdgeDriver
  With driver
  
  .Start &quot;edge&quot;
  .Get &quot;https://login.repsol.com/es/Landing/AuthnPage?returnUrl=https://www.repsol.com/es_es/&quot;
  
   With .FindElementByClass(&quot;gigya-login-form&quot;)
  
          .FindElementByClass(&quot;gigya-input-text&quot;).SendKeys &quot;user&quot; 'your user
          .FindElementByClass(&quot;gigya-input-password&quot;).SendKeys &quot;password&quot; 'your password
           
           
           .FindElementByClass(&quot;gigya-input-submit&quot;).submit
  End With
  
   Application.Wait Now + TimeSerial(0, 0, 10)
   .Get &quot;https://www.repsol.com/es_es/aplicaciones/SO/WebEESS/default.aspx?usuario=&quot;&quot;&quot;
  Application.Wait Now + TimeSerial(0, 0, 10)
  
           
   .Get &quot;https://www.repsol.com/SO/WebEESS/Pages/Carburantes/PeticionCarburante/Peticion.aspx&quot;
  
   With .FindElementByClass(&quot;tablaContenedora&quot;)
  
          .FindElementById(&quot;ctl00_zona1_grdwCarburantes_ctl02_lbltxtCantidad&quot;).SendKeys [B7]
  
           End With
  End With
  
  End Sub
  </code></pre>
  <p>The macro works perfectly but the Edge browser closes when the routine ends</p>