-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Context:
- Playwright Version: [1.9.2
]
- Operating System: [e.g. Windows, Linux or Mac]
- Node.js version: [v14.15.4]
- Browser: [Chromium]
- Extra: [any specific details about your environment]
NOTE : The same code below is working for firefox and Webkit
Code used is below ;-
const { firefox } = require('playwright');
(async () => {
const browser = await firefox.launch({
headless: false
});
const context = await browser.newContext();
// Open new page
const page = await context.newPage();
// Go to https://letcode.in/
await page.goto('https://letcode.in/');
// ---------------------
await page.click('//strong[text()="Sign up"]')
// await context.close();
// await browser.close();
})();
below error is shown
PS C:\Users\Sonu\Desktop\test> node chrome.js
(node:15272) UnhandledPromiseRejectionWarning: page.goto: Navigation failed because page crashed!
=========================== logs ===========================
navigating to "https://letcode.in/", waiting until "load"
Note: use DEBUG=pw:api environment variable to capture Playwright logs.Error
at Object.captureStackTrace (C:\Users\Sonu\Desktop\test\node_modules\playwright\lib\utils\stackTrace.js:48:19)
at Connection.sendMessageToServer (C:\Users\Sonu\Desktop\test\node_modules\playwright\lib\client\connection.js:69:48)
at Proxy. (C:\Users\Sonu\Desktop\test\node_modules\playwright\lib\client\channelOwner.js:64:61)
at C:\Users\Sonu\Desktop\test\node_modules\playwright\lib\client\frame.js:102:65
at Frame._wrapApiCall (C:\Users\Sonu\Desktop\test\node_modules\playwright\lib\client\channelOwner.js:77:34)
at Frame.goto (C:\Users\Sonu\Desktop\test\node_modules\playwright\lib\client\frame.js:100:21)
at C:\Users\Sonu\Desktop\test\node_modules\playwright\lib\client\page.js:296:60
at Page._attributeToPage (C:\Users\Sonu\Desktop\test\node_modules\playwright\lib\client\page.js:231:20)
at Page.goto (C:\Users\Sonu\Desktop\test\node_modules\playwright\lib\client\page.js:296:21)
at C:\Users\Sonu\Desktop\test\chrome.js:13:14
(Use node --trace-warnings ... to show where the warning was created)
(node:15272) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15272) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.