mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: support esm imports (#3125)
This commit is contained in:
parent
21581a4e8b
commit
d234dac752
5
.github/workflows/tests.yml
vendored
5
.github/workflows/tests.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.browser }}-linux-jest-report
|
name: ${{ matrix.browser }}-linux-jest-report
|
||||||
path: jest-report.json
|
path: jest-report.json
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
@ -82,7 +82,7 @@ jobs:
|
|||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.browser }}-mac-jest-report
|
name: ${{ matrix.browser }}-mac-jest-report
|
||||||
path: jest-report.json
|
path: jest-report.json
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
@ -134,6 +134,7 @@ jobs:
|
|||||||
test-package-installations:
|
test-package-installations:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node_version:
|
node_version:
|
||||||
- "^10.17.0" # pre 10.17, --unhandled-rejections=strict was not an option (https://github.com/nodejs/node/pull/26599) which we need in our tests
|
- "^10.17.0" # pre 10.17, --unhandled-rejections=strict was not an option (https://github.com/nodejs/node/pull/26599) which we need in our tests
|
||||||
|
@ -14,6 +14,7 @@ lib/injected/
|
|||||||
!index.d.ts
|
!index.d.ts
|
||||||
|
|
||||||
!index.js
|
!index.js
|
||||||
|
!index.mjs
|
||||||
!install.js
|
!install.js
|
||||||
!README.md
|
!README.md
|
||||||
!LICENSE
|
!LICENSE
|
||||||
|
@ -83,7 +83,7 @@ if (args.some(arg => arg === '--help')) {
|
|||||||
|
|
||||||
// 2. Setup cleanup if needed
|
// 2. Setup cleanup if needed
|
||||||
if (!args.some(arg => arg === '--no-cleanup')) {
|
if (!args.some(arg => arg === '--no-cleanup')) {
|
||||||
process.on('exit', () => {
|
process.on('exit', () => {
|
||||||
cleanupPaths.forEach(cleanupPath => rmSync(cleanupPath, {}));
|
cleanupPaths.forEach(cleanupPath => rmSync(cleanupPath, {}));
|
||||||
});
|
});
|
||||||
process.on('SIGINT', () => process.exit(2));
|
process.on('SIGINT', () => process.exit(2));
|
||||||
@ -123,6 +123,10 @@ if (!package) {
|
|||||||
engines: pwInternalJSON.engines,
|
engines: pwInternalJSON.engines,
|
||||||
homepage: pwInternalJSON.homepage,
|
homepage: pwInternalJSON.homepage,
|
||||||
main: 'index.js',
|
main: 'index.js',
|
||||||
|
exports: {
|
||||||
|
import: './index.mjs',
|
||||||
|
require: './index.js',
|
||||||
|
},
|
||||||
scripts: {
|
scripts: {
|
||||||
install: 'node install.js',
|
install: 'node install.js',
|
||||||
},
|
},
|
||||||
|
35
packages/installation-tests/esm-playwright-chromium.mjs
Normal file
35
packages/installation-tests/esm-playwright-chromium.mjs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { chromium, selectors, devices, errors } from 'playwright-chromium';
|
||||||
|
import playwright from 'playwright-chromium';
|
||||||
|
|
||||||
|
if (playwright.chromium !== chromium)
|
||||||
|
process.exit(1);
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
for (const browserType of [chromium]) {
|
||||||
|
const browser = await browserType.launch();
|
||||||
|
const context = await browser.newContext();
|
||||||
|
const page = await context.newPage();
|
||||||
|
await page.evaluate(() => navigator.userAgent);
|
||||||
|
await browser.close();
|
||||||
|
}
|
||||||
|
console.log(`esm SUCCESS`);
|
||||||
|
})().catch(err => {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
35
packages/installation-tests/esm-playwright-firefox.mjs
Normal file
35
packages/installation-tests/esm-playwright-firefox.mjs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { firefox, selectors, devices, errors } from 'playwright-firefox';
|
||||||
|
import playwright from 'playwright-firefox';
|
||||||
|
|
||||||
|
if (playwright.firefox !== firefox)
|
||||||
|
process.exit(1);
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
for (const browserType of [firefox]) {
|
||||||
|
const browser = await browserType.launch();
|
||||||
|
const context = await browser.newContext();
|
||||||
|
const page = await context.newPage();
|
||||||
|
await page.evaluate(() => navigator.userAgent);
|
||||||
|
await browser.close();
|
||||||
|
}
|
||||||
|
console.log(`esm SUCCESS`);
|
||||||
|
})().catch(err => {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
35
packages/installation-tests/esm-playwright-webkit.mjs
Normal file
35
packages/installation-tests/esm-playwright-webkit.mjs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { webkit, selectors, devices, errors } from 'playwright-webkit';
|
||||||
|
import playwright from 'playwright-webkit';
|
||||||
|
|
||||||
|
if (playwright.webkit !== webkit)
|
||||||
|
process.exit(1);
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
for (const browserType of [webkit]) {
|
||||||
|
const browser = await browserType.launch();
|
||||||
|
const context = await browser.newContext();
|
||||||
|
const page = await context.newPage();
|
||||||
|
await page.evaluate(() => navigator.userAgent);
|
||||||
|
await browser.close();
|
||||||
|
}
|
||||||
|
console.log(`esm SUCCESS`);
|
||||||
|
})().catch(err => {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
39
packages/installation-tests/esm-playwright.mjs
Normal file
39
packages/installation-tests/esm-playwright.mjs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { chromium, firefox, webkit, selectors, devices, errors } from 'playwright';
|
||||||
|
import playwright from 'playwright';
|
||||||
|
|
||||||
|
if (playwright.chromium !== chromium)
|
||||||
|
process.exit(1);
|
||||||
|
if (playwright.firefox !== firefox)
|
||||||
|
process.exit(1);
|
||||||
|
if (playwright.webkit !== webkit)
|
||||||
|
process.exit(1);
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
for (const browserType of [chromium, firefox, webkit]) {
|
||||||
|
const browser = await browserType.launch();
|
||||||
|
const context = await browser.newContext();
|
||||||
|
const page = await context.newPage();
|
||||||
|
await page.evaluate(() => navigator.userAgent);
|
||||||
|
await browser.close();
|
||||||
|
}
|
||||||
|
console.log(`esm SUCCESS`);
|
||||||
|
})().catch(err => {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
@ -22,8 +22,17 @@ PLAYWRIGHT_CHROMIUM_TGZ="$(node ${PACKAGE_BUILDER} playwright-chromium ./playwri
|
|||||||
PLAYWRIGHT_WEBKIT_TGZ="$(node ${PACKAGE_BUILDER} playwright-webkit ./playwright-webkit.tgz)"
|
PLAYWRIGHT_WEBKIT_TGZ="$(node ${PACKAGE_BUILDER} playwright-webkit ./playwright-webkit.tgz)"
|
||||||
PLAYWRIGHT_FIREFOX_TGZ="$(node ${PACKAGE_BUILDER} playwright-firefox ./playwright-firefox.tgz)"
|
PLAYWRIGHT_FIREFOX_TGZ="$(node ${PACKAGE_BUILDER} playwright-firefox ./playwright-firefox.tgz)"
|
||||||
|
|
||||||
SANITY_JS="$(pwd -P)/../sanity.js"
|
SCRIPTS_PATH="$(pwd -P)/.."
|
||||||
TEST_ROOT="$(pwd -P)"
|
TEST_ROOT="$(pwd -P)"
|
||||||
|
NODE_VERSION="$(node --version)"
|
||||||
|
|
||||||
|
function copy_test_scripts {
|
||||||
|
cp "${SCRIPTS_PATH}/sanity.js" .
|
||||||
|
cp "${SCRIPTS_PATH}/esm-playwright.mjs" .
|
||||||
|
cp "${SCRIPTS_PATH}/esm-playwright-chromium.mjs" .
|
||||||
|
cp "${SCRIPTS_PATH}/esm-playwright-firefox.mjs" .
|
||||||
|
cp "${SCRIPTS_PATH}/esm-playwright-webkit.mjs" .
|
||||||
|
}
|
||||||
|
|
||||||
function run_tests {
|
function run_tests {
|
||||||
test_typescript_types
|
test_typescript_types
|
||||||
@ -67,7 +76,7 @@ function test_playwright_global_installation {
|
|||||||
echo "Directory for shared browsers was not created!"
|
echo "Directory for shared browsers was not created!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cp ${SANITY_JS} .
|
copy_test_scripts
|
||||||
if node sanity.js playwright chromium 2>/dev/null; then
|
if node sanity.js playwright chromium 2>/dev/null; then
|
||||||
echo "Should not be able to launch chromium without PLAYWRIGHT_BROWSERS_PATH variable!"
|
echo "Should not be able to launch chromium without PLAYWRIGHT_BROWSERS_PATH variable!"
|
||||||
exit 1
|
exit 1
|
||||||
@ -111,28 +120,44 @@ function test_playwright_should_work {
|
|||||||
initialize_test "${FUNCNAME[0]}"
|
initialize_test "${FUNCNAME[0]}"
|
||||||
|
|
||||||
npm install ${PLAYWRIGHT_TGZ}
|
npm install ${PLAYWRIGHT_TGZ}
|
||||||
cp ${SANITY_JS} . && node sanity.js playwright chromium firefox webkit
|
copy_test_scripts
|
||||||
|
node sanity.js playwright chromium firefox webkit
|
||||||
|
if [[ "${NODE_VERSION}" == *"v14."* ]]; then
|
||||||
|
node esm-playwright.mjs
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_playwright_chromium_should_work {
|
function test_playwright_chromium_should_work {
|
||||||
initialize_test "${FUNCNAME[0]}"
|
initialize_test "${FUNCNAME[0]}"
|
||||||
|
|
||||||
npm install ${PLAYWRIGHT_CHROMIUM_TGZ}
|
npm install ${PLAYWRIGHT_CHROMIUM_TGZ}
|
||||||
cp ${SANITY_JS} . && node sanity.js playwright-chromium chromium
|
copy_test_scripts
|
||||||
|
node sanity.js playwright-chromium chromium
|
||||||
|
if [[ "${NODE_VERSION}" == *"v14."* ]]; then
|
||||||
|
node esm-playwright-chromium.mjs
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_playwright_webkit_should_work {
|
function test_playwright_webkit_should_work {
|
||||||
initialize_test "${FUNCNAME[0]}"
|
initialize_test "${FUNCNAME[0]}"
|
||||||
|
|
||||||
npm install ${PLAYWRIGHT_WEBKIT_TGZ}
|
npm install ${PLAYWRIGHT_WEBKIT_TGZ}
|
||||||
cp ${SANITY_JS} . && node sanity.js playwright-webkit webkit
|
copy_test_scripts
|
||||||
|
node sanity.js playwright-webkit webkit
|
||||||
|
if [[ "${NODE_VERSION}" == *"v14."* ]]; then
|
||||||
|
node esm-playwright-webkit.mjs
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_playwright_firefox_should_work {
|
function test_playwright_firefox_should_work {
|
||||||
initialize_test "${FUNCNAME[0]}"
|
initialize_test "${FUNCNAME[0]}"
|
||||||
|
|
||||||
npm install ${PLAYWRIGHT_FIREFOX_TGZ}
|
npm install ${PLAYWRIGHT_FIREFOX_TGZ}
|
||||||
cp ${SANITY_JS} . && node sanity.js playwright-firefox firefox
|
copy_test_scripts
|
||||||
|
node sanity.js playwright-firefox firefox
|
||||||
|
if [[ "${NODE_VERSION}" == *"v14."* ]]; then
|
||||||
|
node esm-playwright-firefox.mjs
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function initialize_test {
|
function initialize_test {
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
const requireName = process.argv[2];
|
const requireName = process.argv[2];
|
||||||
const browsers = process.argv.slice(3);
|
const browsers = process.argv.slice(3);
|
||||||
|
|
||||||
@ -11,6 +27,7 @@ const playwright = require(requireName);
|
|||||||
await page.evaluate(() => navigator.userAgent);
|
await page.evaluate(() => navigator.userAgent);
|
||||||
await browser.close();
|
await browser.close();
|
||||||
}
|
}
|
||||||
|
console.log(`require SUCCESS`);
|
||||||
})().catch(err => {
|
})().catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
23
packages/playwright-chromium/index.mjs
Normal file
23
packages/playwright-chromium/index.mjs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import playwright from './index.js';
|
||||||
|
|
||||||
|
export const chromium = playwright.chromium;
|
||||||
|
export const selectors = playwright.selectors;
|
||||||
|
export const devices = playwright.devices;
|
||||||
|
export const errors = playwright.errors;
|
||||||
|
export default playwright;
|
25
packages/playwright-core/index.mjs
Normal file
25
packages/playwright-core/index.mjs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import playwright from './index.js';
|
||||||
|
|
||||||
|
export const chromium = playwright.chromium;
|
||||||
|
export const firefox = playwright.firefox;
|
||||||
|
export const webkit = playwright.webkit;
|
||||||
|
export const selectors = playwright.selectors;
|
||||||
|
export const devices = playwright.devices;
|
||||||
|
export const errors = playwright.errors;
|
||||||
|
export default playwright;
|
23
packages/playwright-electron/index.mjs
Normal file
23
packages/playwright-electron/index.mjs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import playwright from './index.js';
|
||||||
|
|
||||||
|
export const electron = playwright.electron;
|
||||||
|
export const selectors = playwright.selectors;
|
||||||
|
export const devices = playwright.devices;
|
||||||
|
export const errors = playwright.errors;
|
||||||
|
export default playwright;
|
23
packages/playwright-firefox/index.mjs
Normal file
23
packages/playwright-firefox/index.mjs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import playwright from './index.js';
|
||||||
|
|
||||||
|
export const firefox = playwright.firefox;
|
||||||
|
export const selectors = playwright.selectors;
|
||||||
|
export const devices = playwright.devices;
|
||||||
|
export const errors = playwright.errors;
|
||||||
|
export default playwright;
|
23
packages/playwright-webkit/index.mjs
Normal file
23
packages/playwright-webkit/index.mjs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import playwright from './index.js';
|
||||||
|
|
||||||
|
export const webkit = playwright.webkit;
|
||||||
|
export const selectors = playwright.selectors;
|
||||||
|
export const devices = playwright.devices;
|
||||||
|
export const errors = playwright.errors;
|
||||||
|
export default playwright;
|
25
packages/playwright/index.mjs
Normal file
25
packages/playwright/index.mjs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Microsoft Corporation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import playwright from './index.js';
|
||||||
|
|
||||||
|
export const chromium = playwright.chromium;
|
||||||
|
export const firefox = playwright.firefox;
|
||||||
|
export const webkit = playwright.webkit;
|
||||||
|
export const selectors = playwright.selectors;
|
||||||
|
export const devices = playwright.devices;
|
||||||
|
export const errors = playwright.errors;
|
||||||
|
export default playwright;
|
Loading…
x
Reference in New Issue
Block a user