I am getting an error when trying to import a local file, though no problem when using npm packages. server.js api.js Starting app Error Answer I’m answering my own question if anybody else has this problem. It turns out in experimental mode you need to define the full path with extension. So I am trying to import index.js thinking it
Tag: google-chrome-devtools
Injecting CSS into site with Puppeteer
The site I’m running automated tests on with Puppeteer displays info popups if actions were successful or when something failed. Unfortunately, these popups sometimes cover up buttons my script has to click on. It would be great if I could inject some CSS into the site to hide these popups. Is there an built-in way to do this? Answer addStyleTag:
How to fill an input field using Puppeteer?
I’m using Puppeteer for E2E test, and I am now trying to fill an input field with the code below: It worked, but I found the email address was typed into the field one character by one character as if a real human being was typing. Is it possible to fill the input field with the email address all at
Wait for text to appear when using Puppeteer
I wonder if there’s a similar way as in Selenium to wait for text to appear for a particular element. I’ve tried something like this, but it doesn’t seem to wait: Answer You can use waitForFunction. See https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitforfunctionpagefunction-options-args Including @elena’s solution for completeness of the answer:
how to totally ignore ‘debugger’ statement in chrome?
‘never pause here’ can not work after I continue: still paused Answer To totally ignore all breakpoints in Chrome, you must do as follows: Open your page in the Chrome browser. Press F12 or right-click on the page and select Inspect. In the Source panel, press Ctrl+F8 to deactivate all breakpoints. (or: At the top-right corner, select deactivate breakpoints.) All
JS Fetching batch data with HTTP
My RESTful service allows batching requests. I’m trying to combine requests into one batch with help of Fetch API: However it returns an error – bad request. I suppose I may combine HTTP requests in wrong way. Is there simpler way of doing this? Where in Network Chrome Dev Tools can I see nested HTTP requests? Answer Your code does
Optimizing native hit testing of DOM elements (Chrome)
I have a heavily optimized JavaScript app, a highly interactive graph editor. I now started profiling it (using Chrome dev-tools) with massive amounts of data (thousands of shapes in the graph), and I’m encountering a previously unusual performance bottleneck, Hit Test. This takes up 65% of everything (!), remaining a monster bottleneck in my codebase. I know this is the
Javascript count function calls in Chrome profiler
Is it possible to get information from Chrome profile (Developer Tools) how many times functions are called? I found how to do it in code: and some really old (year 2011 and around) topics and feature request like this one. But no new information if it is possible to record count for every function calls. Sometimes you figure it out
Cancel ajax request from chrome developer tools
I want to cancel the ajax request from chrome developer tools after it has initiated. For example I want to test my fallback message is showing correctly. I can set No throttling to Offline so that all calls will fail, but I just want to test one API to fail, for debugging purposes. I know I can use abort() methods,
Is it possible to detect what action causes page reload?
Unknown script action (probably async) causes page reload. How can I find this action in the code? At least, is there any way to set breakpoint on access to window.location? But I’m not sure that navigation is forced in such way. In fact I need a way working in any one browser as page reloads in any of them. PS: