AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Add Edge browser support using EdgeChromiumDriverManager

Open karimhabush opened this issue 2 years ago • 9 comments

Background

This pull request aims to add support for the Edge browser in the web_selenium.py commands. The change will allow users to leverage the Edge browser while using Selenium for web automation tasks, in addition to the existing supported browsers.

Changes

  • Imported EdgeChromiumDriverManager from the webdriver_manager.microsoft package.
  • Added EdgeOptions to the available browser options.
  • Updated the driver initialization logic to use the Edge driver when the configured browser is set to "edge".

Documentation

The changes made in this pull request are documented within the .env.template file.

Test Plan

  1. Set the USE_WEB_BROWSER variable to edge within the file .env.template.
  2. Rename the file .env.template to .env
  3. Run the script and provide a prompt that requires the command browse_website to ensure that the Edge browser is launched and web scraping tasks are performed without any issues.
  4. Test the same script with other browsers (Chrome, Safari, and Firefox) to ensure that the existing functionality remains intact.

PR Quality Checklist

  • [x] My pull request is atomic and focuses on a single change.
  • [x] I have thoroughly tested my changes with multiple different prompts.
  • [x] I have considered potential risks and mitigations for my changes.
  • [x] I have documented my changes clearly and comprehensively.
  • [x] I have not snuck in any "extra" small tweaks changes

karimhabush avatar Apr 23 '23 21:04 karimhabush

Codecov Report

Patch coverage has no change and project coverage change: -8.55 :warning:

Comparison is base (aedd288) 49.20% compared to head (1cd730f) 40.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3058      +/-   ##
==========================================
- Coverage   49.20%   40.65%   -8.55%     
==========================================
  Files          63       63              
  Lines        3014     3018       +4     
  Branches      496      497       +1     
==========================================
- Hits         1483     1227     -256     
- Misses       1411     1719     +308     
+ Partials      120       72      -48     
Impacted Files Coverage Δ
autogpt/commands/web_selenium.py 0.00% <0.00%> (ø)

... and 15 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Apr 23 '23 21:04 codecov[bot]

Can you run the linter (black) and issort to fix the linter errors

ntindle avatar Apr 23 '23 21:04 ntindle

Can you run the linter (black) and issort to fix the linter errors

Sure thing!

karimhabush avatar Apr 23 '23 21:04 karimhabush

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) May 13, 2023 9:22pm

vercel[bot] avatar May 02 '23 02:05 vercel[bot]

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.02 :warning:

Comparison is base (2f7beeb) 60.84% compared to head (9b91cfc) 60.83%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3058      +/-   ##
==========================================
- Coverage   60.84%   60.83%   -0.02%     
==========================================
  Files          73       73              
  Lines        3315     3319       +4     
  Branches      543      544       +1     
==========================================
+ Hits         2017     2019       +2     
- Misses       1160     1161       +1     
- Partials      138      139       +1     
Impacted Files Coverage Δ
autogpt/commands/web_selenium.py 84.44% <50.00%> (-1.61%) :arrow_down:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar May 02 '23 03:05 codecov[bot]

This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!

For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

p-i- avatar May 05 '23 00:05 p-i-

Note this looks like a useful change to be reviewed/integrated despite the ongoing re-arch effort, it's primarily config-level, with very few code changes (and those primarily are about supporting a new option). So definitely do consider for review/integration to help close some PRs. Thanks

Boostrix avatar May 07 '23 07:05 Boostrix

IMO, I don't recommend rn.

https://github.com/Significant-Gravitas/Auto-GPT/pull/1988#issuecomment-1537340291

anonhostpi avatar May 07 '23 07:05 anonhostpi