kazurayam / chromedriverfactory

A Java library that enables you to launch Selenium ChromeDriver using an existing user Profile. That let you to carry cookies over multiple HTTP sessions via user Profile.
0 stars 0 forks source link

CookieServer #37

Closed kazurayam closed 2 years ago

kazurayam commented 2 years ago

I want to include v0.6.6 httpserver.groovy in the jar to make it portable accross projects.

The httpserver.groovy is used as a counter part of the CarryingCookieOverSessionsViaProfile.groovy test. It is important.

I want to compile the chromedriverfactory project with Selenium 3, but want also use it in other project with Selenium 4 (Chrome DevTools Protocol), and in there I would need the server which can send Set-Cookie Header as I want.

I would rename it to SetCookieServer.

kazurayam commented 2 years ago

I introduced the JCommand library to help parsing the command line options

kazurayam commented 2 years ago

See test_startup_shutdown() of CookieServerTest

Also I can start CookieServerTest in the commandline.

kazurayam commented 2 years ago

CookieServer emits following message in the System.out, which is informative enough for debugging the ChromeDriverFactory.

Starting ChromeDriver 96.0.4664.45 (76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-heads/4664@{#947}) on port 30054
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1642383724.864][WARNING]: This version of ChromeDriver has not been tested with Chrome version 97.
1 17, 2022 10:42:05 午前 org.openqa.selenium.remote.ProtocolHandshake createSession
情報: Detected dialect: W3C

<<<< Request received
method = GET
uri = /
body = 

==== Cookies cooked
in the request:  no cookies found
in the response: cookies=[timestamp=Mon, 17 Jan 2022 01:42:05 GMT; Max-Age=35;]

>>>> Response sent
/ is a directory.

<<<< Request received
method = GET
uri = /favicon.ico
body = 

==== Cookies cooked
in the request:  cookies=[timestamp=Mon, 17 Jan 2022 01:42:05 GMT]
in the response: cookies=[timestamp=Mon, 17 Jan 2022 01:42:05 GMT; max-age=35]

>>>> Response sent
favicon.ico is not found.