kazurayam / selenium-webdriver-java

Examples of the O'Reilly book "Hands-On Selenium WebDriver with Java"
https://oreil.ly/1E7CX
Apache License 2.0
0 stars 0 forks source link

Use mitmproxy instead of browsermob-proxy #26

Open kazurayam opened 9 months ago

kazurayam commented 9 months ago

25 revealed that browsermob-proxy does not work well with WebDrverManager due to a version collision of the dependency.

Unfortunately the lightbody/browsermob-proxy project is not actively maintained (it is Nov 2023 today). The latest version v2.1.5 was release Sept 2017, 6 years ago! The project has a lot of open issues, and unwatched pull requests.

It would be an idea to use another proxy project.

In the issue list of browermob-proxy https://github.com/lightbody/browsermob-proxy/pull/788 someonementioned

But the browserup-proxy project already announced it is deprecated. They mentioned

Let me have a look at the mitmproxy.

What does the acronym "mitm" means? --- possibly Man In The Middle, I suppose.

kazurayam commented 9 months ago

The mitmproxy looks good, but it is a Python program. I would try it personally sometime in future. But mitmproxy would not be suitable for the book "Selenium WebDriver with Java" as it drops out of the coverage of the book.

kazurayam commented 9 months ago

I have succeeded to dump a HAR file from a JUnit5 test using WebDriverManager + Chrome + mitmdump command

https://github.com/kazurayam/mitmproxy-lesson/blob/develop/app/src/test/java/io/github/bonigarcia/webdriver/juipter/ch09/performance/CapturingNetworkTrafficChromeJupiterTest.java

I would write a documentation how to prepare the envronment and how to write a test.


I feel that the mitmproxy project is active, so that much more reliable than BrowserMob Proxy.