Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Playwright instead of Selenium in AWebBrowser.py for easier chrome driver instalation? #58

Open
jechaviz opened this issue Aug 8, 2024 · 2 comments

Comments

@jechaviz
Copy link

jechaviz commented Aug 8, 2024

With playwrite is easier chrome driver updates and instalation. It's just a matter of "playwright install"
Check it out.
https://www.zenrows.com/blog/playwright-vs-selenium

@jechaviz
Copy link
Author

jechaviz commented Aug 8, 2024

Or use webdriver_manager in your project:
pip install webdriver_manager

Use it in your script:
Instead of manually specifying the path to the ChromeDriver, you can use webdriver_manager to handle it.

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

# Setup ChromeDriver with webdriver_manager
driver = webdriver.Chrome(ChromeDriverManager().install())

@stevenlu137
Copy link
Collaborator

Thank you for the information! This is indeed the first time I've heard about the Playwright option. I will look into this library and see if we can implement a better browser module.

However, I'd like to know more about the specific issue you encountered. Currently, the implementation of the browser module does consider the installation of chromedriver. According to this source (https://www.selenium.dev/documentation/selenium_manager/), Selenium is already capable of automatically managing the installation and maintenance of chromedriver (although it is still in the beta version). If there's a problem with chromedriver, it would be helpful to understand the environmental conditions under which it occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants