feat: add default args to chrome (#8341) <!-- 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
4 дня назад История
README.md

Try TestCafe Studio IDE

testcafe

Tests Test Dependencies NPM Version

Automate end-to-end web testing with TestCafe, a Node.js-based testing framework.

TestCafe is free and as easy to use as 1-2-3:
1. Write your tests in JS or TypeScript.
2. Execute your tests.
3. View test results.

Homepage   •   Documentation   •   FAQ   •   Support

  • Works on all popular environments: TestCafe runs on Windows, MacOS, and Linux. It supports desktop, mobile, remote and cloud browsers (UI or headless).
  • 1 minute to set up: You do not need WebDriver or any other testing software. Install TestCafe with one command, and you are ready to test: npm install -g testcafe
  • Free and open source: TestCafe is free to use under the MIT license. Plugins provide custom reports, integration with other tools, launching tests from IDE, etc. You can use the plugins made by the GitHub community or create your own.

Install TestCafe and Run a Test

Running a sample test in Safari

Table of contents

Features

Stable tests and no manual timeouts
TestCafe automatically waits for page loads and XHRs before the test starts and after each action. It also features smart test actions and assertions that wait for page elements to appear. You can change the maximum wait time. If elements load faster, tests skip the timeout and continue.

Rapid test development tool
When you enable live mode, changes to test code immediately restart the test, and you instantly see the results.

Latest JS and TypeScript support
TestCafe supports the most recent JavaScript-related features, including ES2017 (async/await). You can also use TypeScript if you prefer a strongly typed language instead.

Detects JS errors in your code
TestCafe reports JS errors that it locates on a given webpage. Tests automatically fail if TestCafe encounters such errors.
You can, however, disable this option.

Concurrent test launch
TestCafe can open multiple instances of the same browser and run parallel tests (to help decrease test execution time).

PageObject pattern support
The TestCafe’s Test API includes a high-level selector library, assertions, etc. You can combine them to implement readable tests with the PageObject pattern.

const macOSInput = Selector('.column').find('label').withText('MacOS').child('input');

Easy to include in a continuous integration system
You can run TestCafe from a console, and its reports can be viewed within CI systems (TeamCity, Jenkins, Travis & etc.)

Love TestCafe Open-source Edition? Want to Record Tests without Writing JavaScript or TypeScript Code?

TestCafe Studio: IDE for End-to-End Web Testing

TestCafe is the perfect choice for JavaScript developers and experienced Q&A teams. If you’d like to delegate testing to QA engineers and are looking for a code-free way to record and maintain tests compatible with your existing infrastructure, check out TestCafe Studio - a testing IDE built atop the open-source version of TestCafe.

Review the following article to learn how TestCafe Studio can fit into any workflow: What’s Better than TestCafe? TestCafe Studio.

Get Started with TestCafe Studio

Record and Run a Test in TestCafe Studio

Getting Started

Installation

Ensure that you run Node.js version 16 or higher, and run the following command:

npm install -g testcafe

Creating the Test

For this simple example, we will test the following page: https://devexpress.github.io/testcafe/example

Create a .js or .ts file on your computer. Remember that a .js or .ts file must maintain a specific structure: tests must be organized into fixtures. You can paste the following code to see the test in action:

import { Selector } from 'testcafe'; // first import testcafe selectors

fixture `Getting Started`// declare the fixture
    .page `https://devexpress.github.io/testcafe/example`;  // specify the start page


//then create a test and place your code within it
test('My first test', async t => {
    await t
        .typeText('#developer-name', 'John Smith')
        .click('#submit-button')

        // Use the assertion to check if actual header text equals expected text
        .expect(Selector('#article-header').innerText).eql('Thank you, John Smith!');
});

Running the Test

Call the following command in a command shell. Specify the target browser and file path.

testcafe chrome test1.js

TestCafe opens the browser and begins test execution.

Important: Make certain the browser tab that runs tests stays active. Do not minimize the browser window. Inactive tabs and minimized browser windows switch to lower resource consumption mode. In low consumption mode, tests may not execute correctly.

Viewing the Results

TestCafe outputs results into a command shell by default. See Reporters for more information. You can also use plugins to customize reports.

Test Report

Read the Getting Started page for additional assistance.

Documentation

Visit the following webpage to review our online help system: Documentation.

Get Help

Join the TestCafe community on Stack Overflow. Ask and answer questions using the TestCafe tag.

Issue Tracker

Use our GitHub issues page to report bugs and suggest enhancements.

Stay in Touch

Follow us on Twitter. We post TestCafe news and updates.

Contributing

Read our Contributing Guide to learn how to contribute to the project.

To create your own plugin for TestCafe, you can use these plugin generators:

If you want your plugin to be listed below, send us a note in a Github issue.

Thanks to all of our contributors – We appreciate your commitment to the TestCafe community.

aha-oretama ai aleks-pro Aleksey28 AlexanderMoiseev AlexanderMoskovkin
aha-oretama ai aleks-pro Aleksey28 AlexanderMoiseev AlexanderMoskovkin
alexey-lin AlexKamaev alexphilin AlexSkorkin alexwybraniec AnastasiaIvanova8
alexey-lin AlexKamaev alexphilin AlexSkorkin alexwybraniec AnastasiaIvanova8
andrewbranch AndreyBelym AndyWendt AnnaKondratova anthophobiac Artem-Babich
andrewbranch AndreyBelym AndyWendt AnnaKondratova anthophobiac Artem-Babich
Arthy000 augustomezencio-hotmart bdwain benmonro beyondcompute bill-looby-i
Arthy000 augustomezencio-hotmart bdwain benmonro beyondcompute bill-looby-i
bsmithb2 caseyWebb cdrini cgfarmer4 Chris-Greaves churkin
bsmithb2 caseyWebb cdrini cgfarmer4 Chris-Greaves churkin
dej611 DIRECTcut Dmitry-Ostashev eignatyev ericyd Farfurix
dej611 DIRECTcut Dmitry-Ostashev eignatyev ericyd Farfurix
flora8984461 GeoffreyBooth helen-dikareva honsq90 infctr inikulin
flora8984461 GeoffreyBooth helen-dikareva honsq90 infctr inikulin
Ivan-Katovich jamesgeorge007 jaypea josephmalam kanhaiya15 karolnowinski
Ivan-Katovich jamesgeorge007 jaypea josephmalam kanhaiya15 karolnowinski
kirovboris kisrefod LavrovArtem link89 lzxb macdonaldr93
kirovboris kisrefod LavrovArtem link89 lzxb macdonaldr93
MargaritaLoseva Marketionist MatthewNielsen27 mattkubej mattmanske mcjim
MargaritaLoseva Marketionist MatthewNielsen27 mattkubej mattmanske mcjim
miherlosev morfey13 mostlyfabulous murajun1978 NickCis Nuarat
miherlosev morfey13 mostlyfabulous murajun1978 NickCis Nuarat
Ogurecher PayBas pgorny pietrovich radarhere raspo
Ogurecher PayBas pgorny pietrovich radarhere raspo
rbardini renancouto rob4629 rueyaa332266 sgrillon14 smockle
rbardini renancouto rob4629 rueyaa332266 sgrillon14 smockle
stefanschenk superroma sylbru taiki-fw testcafe-build-bot theghostbel
stefanschenk superroma sylbru taiki-fw testcafe-build-bot theghostbel
titerman tobiasbueschel varunkumar VasilyStrelyaev vitalics Vla8islav
titerman tobiasbueschel varunkumar VasilyStrelyaev vitalics Vla8islav
wentwrong b12031106 danielroe danieltroger DevSide intermike
wentwrong b12031106 danielroe danieltroger DevSide intermike
kirillsalikhov michaelficarra rr13k tomashanacek TrevorKarjanis
kirillsalikhov michaelficarra rr13k tomashanacek TrevorKarjanis

Plugins

TestCafe developers and community members made these plugins:

Different Versions of TestCafe

  TestCafe TestCafe Studio
No need for WebDriver, browser plugins or other tools
Cross-platform and cross-browser out of the box
Write tests in the latest JavaScript or TypeScript
Clear and flexible API supports ES6 and PageModel pattern
Stable tests due to the Smart Assertion Query Mechanism
Tests run fast due to intelligent Automatic Waiting Mechanism and Concurrent Test Execution
Custom reporter plugins
Use third-party Node.js modules in test scripts
Integration with popular CI systems  ✓*
Free and open-source  
Visual Test Recorder  
Interactive Test Editor  
Automatic Selector Generation  
Run Configuration Manager  
IDE-like GUI  

* You can use open-source TestCafe to run TestCafe Studio tests in CI systems.

Badge

Show everyone you are using TestCafe: Tested with TestCafe

To display this badge, add the following code to your repository readme:

<a href="https://github.com/DevExpress/testcafe">
    <img alt="Tested with TestCafe" src="https://img.shields.io/badge/tested%20with-TestCafe-2fa4cf.svg">
</a>

Thanks to BrowserStack

We are grateful to BrowserStack for providing the infrastructure that we use to test code in this repository.

BrowserStack Logo

License

Code released under the MIT license.

Creators

Developer Express Inc. (https://devexpress.com)

Описание

A Node.js tool to automate end-to-end web testing.

Конвейеры
0 успешных
0 с ошибкой