1.0.14 • Published 7 months ago

testcafe-modheader v1.0.14

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

TestCafe ModHeader Package

This package allows you to set ModHeader values in your TestCafe test cases. It provides a convenient way to manipulate request headers using the ModHeader Chrome extension during your TestCafe tests.

Installation

You can install the package via npm:

npm install testcafe-modheader --save-dev

Usage

import testCafeModHeader from 'testcafe-modheader';

fixture`Example Page`.page`http://www.example.com`;

test('Example Test', async (t) => {
    // Define the request headers
    const requestHeaders = {
        'Authorization': 'Bearer your_token_here',
        'Content-Type': 'application/json',
    };

    // Set the ModHeader values
    await testCafeModHeader.setModHeaders(requestHeaders);

    // Execute your TestCafe test steps here
    await t
        .typeText('#inputField', 'Test input')
        .click('#submitButton')
        .expect(Selector('#result').innerText).eql('Expected Result');
});
1.0.14

7 months ago

1.0.13

7 months ago

1.0.12

7 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago