richardyc / Chrome-GPT

An AutoGPT agent that controls Chrome on your desktop
GNU General Public License v3.0
1.68k stars 207 forks source link

fix: stabilize form inputs by avoiding StaleElementExceptions #41

Open BaseInfinity opened 1 year ago

BaseInfinity commented 1 year ago

These are some changes I've made on my end to reduce the amount of StaleElementExceptions as much as possible.

TBH there's a TON of places this can happen due to the nature of the tool. Looping through a crap ton of elements and trying to use them later while the page is loading is kinda asking for it but this is experimental so meh lol.

I hate using Sleeps as much as the next guy but it was my last resort and I wanted to work on other stuff lol

BaseInfinity commented 1 year ago

I'll fix up the tests in a day or so, I tried to cherry pick this change but maybe I missed soemthing

BaseInfinity commented 1 year ago

Finally got tests passing =) @richardyc

These are the cherry picked commits that increased stability on my fork