Make browsing with Selenium Browser Agnostic #1572
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation from #1566 since massive nuke merge #1537
Background
In it's current implementation selenium browsing only works with Chrome. And nothing else. This is exclusionary to other users who don't want to or don't have chrome installed.
Additionally I would like to make some changes to allow the user to choose to use the old web-scraping functions.
Changes
Added support for 2 more browsers: Firefox and safari. Note that safari doesn't have a driver manager and there's some additional setup the user needs to do to get it working. See this article.
It might be smart to automate the setup (it seems to be a single shell command), so if someone could input if I should do that, that'd be greatly appreciated.
Test Plan
Set
USE_WEB_BROWSER=firefox
in my.env
and asked autogpt to summarize a website for me. Selenium opened firefox with no problems, and continued as normal. I have NOT been able to test Safari as I'm not on MacOS.PR Quality Checklist