Skip to content

Commit

Permalink
feat: add default args to chrome (#8341)
Browse files Browse the repository at this point in the history
<!--
Thank you for your contribution.

Before making a PR, please read our contributing guidelines at

https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution

We recommend creating a *draft* PR, so that you can mark it as 'ready
for review' when you are done.
-->

## Purpose


## Approach
`--disable-search-engine-choice-screen`
Disables the screen that prompts users to select a default search engine
when launching the browser for the first time.

`--disable-component-extensions-with-background-pages`
Prevents component extensions with background pages (extensions running
in the background) from being loaded.

`--allow-pre-commit-input`
Allows user input before a commit action completes, usually related to
development or debugging tasks.

`--disable-background-networking`
Disables any networking tasks that would typically run in the
background, such as preloading content or updating components.

`--disable-background-timer-throttling`
Stops the throttling of background timers, ensuring background tabs have
the same timer performance as active tabs.

`--disable-backgrounding-occluded-windows`
Prevents reducing the priority of windows that are fully covered
(occluded) by other windows.

`--disable-breakpad`
Disables the Breakpad crash reporting system, preventing crash reports
from being sent to developers.

`--disable-client-side-phishing-detection`
Turns off the browser's built-in phishing detection mechanisms.

`--disable-default-apps`
Prevents default apps from being installed on first run, often used in
testing environments.

`--disable-extensions`
Disables all browser extensions.

`--disable-hang-monitor`
Turns off the monitoring of hung browser processes, which could
otherwise trigger recovery or debugging processes.

`--disable-infobars`
Prevents informational bars (like "Chrome is being controlled by
automated test software") from appearing.

`--disable-ipc-flooding-protection`
Removes protections against flooding inter-process communication (IPC)
channels with too many messages.

`--disable-popup-blocking`
Turns off the browser's pop-up blocker, allowing all pop-ups to appear.

`--disable-prompt-on-repost`
Disables the warning when a form is re-submitted (a repost).

`--disable-renderer-backgrounding`
Prevents renderer processes from being deprioritized when they are in
the background.

`--disable-sync`
Disables the browser's syncing features, such as syncing bookmarks,
settings, and history.

`--enable-automation`
Indicates that the browser is being controlled by automated testing
software (like Selenium).

`--export-tagged-pdf`
Exports PDFs with tagged metadata for accessibility.

`--generate-pdf-document-outline`
Generates a document outline (e.g., a table of contents) for exported
PDFs.

`--force-color-profile=srgb`
Forces the use of the sRGB color profile for consistent color rendering.

`--metrics-recording-only`
Limits functionality to only record performance metrics, often used for
diagnostics.

`--no-first-run`
Skips the first-run experience, such as the welcome screen and initial
setup dialogs.

`--password-store=basic`
Configures the browser to use a simple, unencrypted password store.

`--use-mock-keychain`
Replaces the system's keychain (for password management) with a mock
version, typically for testing environments.

## References
closes DevExpress/testcafe-private#526
## Pre-Merge TODO
- [ ] Write tests for your proposed changes
- [ ] Make sure that existing tests do not fail
  • Loading branch information
PavelMor25 authored Nov 22, 2024
1 parent f9848f3 commit 817e3a4
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ export function buildChromeArgs ({ config, cdpPort, platformArgs, tempProfileDir
const defaultArgs = [
'--disable-search-engine-choice-screen',
'--disable-component-extensions-with-background-pages',
'--allow-pre-commit-input',
'--disable-background-networking',
'--disable-background-timer-throttling',
'--disable-backgrounding-occluded-windows',
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-default-apps',
'--disable-extensions',
'--disable-hang-monitor',
'--disable-infobars',
'--disable-ipc-flooding-protection',
'--disable-popup-blocking',
'--disable-prompt-on-repost',
'--disable-renderer-backgrounding',
'--disable-sync',
'--enable-automation',
'--export-tagged-pdf',
'--generate-pdf-document-outline',
'--force-color-profile=srgb',
'--metrics-recording-only',
'--no-first-run',
'--password-store=basic',
'--use-mock-keychain',
];

let chromeArgs = []
Expand Down

0 comments on commit 817e3a4

Please sign in to comment.