Skip to content

Commit

Permalink
Use Chrome instead for saving profile.
Browse files Browse the repository at this point in the history
Firefox has a problem with using saved profile.
SeleniumHQ/selenium#11028
  • Loading branch information
yangziy committed Dec 27, 2023
1 parent dd734a0 commit 7503631
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def scroll_down(browser):
browser.execute_script("window.scrollTo(0, document.body.scrollHeight);")
time.sleep(2)

options = webdriver.FirefoxOptions()
options = webdriver.ChromeOptions()
options.add_argument('--headless')

with webdriver.Firefox(options=options) as browser:
with webdriver.Chrome(options=options) as browser:
url = 'https://twitter.com/'
browser.get(url)

Expand Down

0 comments on commit 7503631

Please sign in to comment.