Python Forum
Connect to existing Firefox session with Selenium
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connect to existing Firefox session with Selenium
#1
Hi guys, is there a way to connect to existing Firefox session with Selenium, how you can do it with Chrome or Chromium?
from msedge.selenium_tools import Edge, EdgeOptions
# Launch Microsoft Edge (Chromium)
options = EdgeOptions()
options.use_chromium = True
options.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
drivePath = r'C:\\Users\\msedgedriver.exe'
driver = Edge(executable_path = drivePath, options= options)
With Firefox I open a debugging session with
firefox.exe --start-debugger-server 9224 -profile C:\FirefoxTEMP
But when I try to connect it to Firefox, it does not work. I don't get where I should add debugger adress
from selenium.webdriver.firefox.options import Options
options = Options()
caps = webdriver.DesiredCapabilities().FIREFOX
caps["marionette"] = True
drivePath = r'C:\\Users\\geckodriver.exe'
driver = webdriver.Firefox(firefox_options=options, capabilities=caps, executable_path = drivePath)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help for script access via webdriver to an open web page in Firefox Clixmaster 1 1,255 Apr-20-2023, 05:27 PM
Last Post: farshid
  Unable to access javaScript generated data with selenium and headless FireFox. pjn4 0 2,541 Aug-04-2019, 11:10 AM
Last Post: pjn4
  webdriver.remote to connect back existing browser without open new browser? gahhon 6 6,751 Feb-26-2019, 03:53 PM
Last Post: gahhon
  Firefox Selenium (open new tab) oneclick 1 7,751 Dec-29-2018, 06:59 AM
Last Post: hbknjr
  selenium not running firefox Sanlus 5 4,916 Aug-31-2018, 10:37 PM
Last Post: snippsat
  Proxy Variable in Selenium wont work with FireFox Profile Proxy Setting. MIPython 0 8,515 Jul-13-2018, 05:43 PM
Last Post: MIPython
  How to geckodriver anonymous firefox mariolopes 5 7,199 Feb-10-2018, 10:58 PM
Last Post: mariolopes
  Selenium with headless firefox is slow mgtheboss 4 14,973 Jan-13-2018, 09:03 PM
Last Post: metulburr
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,626 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020