Hacker News new | ask | show | jobs
by zelo 2523 days ago
Selenium for sure doesn't fit in your use case then :). I pointed "user-centric approach" because selenium focuses on allowing only things normal user could do in normal user way which is limiting for automation but it's a blessing if you want to look as close to the real user as you can. I worked on solving google ReCaptcha v2/v3 at bigger scale and it's been a solid advantage.

> And javascript code in a string of python can not be linted, which increases debugging workload.

If you use PyCharm or any other JetBrains IDE you can use `Language Injections` [0]

> I am wondering if using puppeteer can ease pains mentioned above.

I'm not sure about puppeteer but Chrome DevTools Protocol [1] (I think this is what puppeteer use under the hood, but I'm not sure) may be interesting for you because it gives low level access to browser mechanisms like injecting code before page load, request interception or separate browser contexts between separate tabs.

[0] https://www.jetbrains.com/help/pycharm/using-language-inject...

[1] https://chromedevtools.github.io/devtools-protocol/

1 comments

Thank you. The Language Injections feature amazes a vim user, though similar limited plugin exists.