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

review Command line options to start Chrome browser --- study KS and learn from it #23

Open kazurayam opened 2 years ago

kazurayam commented 2 years ago

The following is the commandline that Katalon Studio used to start Chrome via ChromeDriver

/Applications/Google Chrome.app/Contents/MacOS/Google Chrome --allow-pre-commit-input --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --enable-automation --enable-blink-features=ShadowDOMV0 --enable-logging --load-extension --log-level=0 --no-first-run --no-service-autorun --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/var/folders/lh/jkh513dn7f3c0j09z131g1z00000gn/T/.com.google.Chrome.VBbYrj --flag-switches-begin --flag-switches-end data:,
スクリーンショット 2022-01-10 20 09 07

It would nice if the WebDriverFactory generates the same command line options as KS.

kazurayam commented 2 years ago

The following is a screenshot invoked by ChromeDriverFactory.

/Applications/Google Chrome.app/Contents/MacOS/Google Chrome --allow-pre-commit-input --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-gpu --disable-hang-monitor --disable-infobars --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disableExtensions --enable-automation --enable-blink-features=ShadowDOMV0 --enable-logging --log-level=0 --no-first-run --no-sandbox --no-service-autorun --password-store=basic --remote-debugging-port=0 --test-type=webdriver --use-mock-keychain --user-data-dir=/var/folders/lh/jkh513dn7f3c0j09z131g1z00000gn/T/.com.google.Chrome.oKDIgU --window-size=1024,768 --flag-switches-begin --flag-switches-end data:,
スクリーンショット 2022-01-10 20 17 13

What's the difference from KS?

kazurayam commented 2 years ago

I compared 2 to make a diff

commandline_ks.txt commandline_wf.txt diff.txt

--- commandline_ks.txt  2022-01-10 20:32:02.000000000 +0900
+++ commandline_wf.txt  2022-01-10 20:33:45.000000000 +0900
@@ -1,25 +1,30 @@
-by Katalon Studio
+by kazurayam

 /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
                      --allow-pre-commit-input
                      --disable-background-networking
                      --disable-client-side-phishing-detection
                      --disable-default-apps
+                     --disable-dev-shm-usage
+                     --disable-gpu
                      --disable-hang-monitor
+                     --disable-infobars
                      --disable-popup-blocking
                      --disable-prompt-on-repost
                      --disable-sync
+                     --disableExtensions
                      --enable-automation
                      --enable-blink-features=ShadowDOMV0
                      --enable-logging
-                     --load-extension
                      --log-level=0
                      --no-first-run
+                     --no-sandbox
                      --no-service-autorun
                      --password-store=basic
                      --remote-debugging-port=0
                      --test-type=webdriver
                      --use-mock-keychain
-                     --user-data-dir=/var/folders/lh/jkh513dn7f3c0j09z131g1z00000gn/T/.com.google.Chrome.VBbYrj
+                     --user-data-dir=/var/folders/lh/jkh513dn7f3c0j09z131g1z00000gn/T/.com.google.Chrome.oKDIgU
+                     --window-size=1024,768
                      --flag-switches-begin
                      --flag-switches-end data:,