I'm setting up integration test workflow in my current project. For that I'm using jest-puppeteer and writing test cases in typescript. But await page.goto(url, {waitUntil:'networkidle2'}) is unable to load any URL. I have reproduced the issue please refer this package. https://github.com/Dip686/jest-puppeteer-ts
Related
I am trying to create a custom dashboard on the angular app I am building. I want to use the data from Google Analytics 4 using Google Analytics Data API. I've successfully ran the scripts provided in their tutorial Using Node.JS client libraries (https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries?hl=en_US).
I've ran the quickstart script they have provided using Node.JS and was able to get the expected response. However, when I try to ran the same script on my angular app via importing the script to fetch returned values, "ng serve" returns webpack 5 errors.
The issue was importing the BetaAnalyticsDataClient. Whenever I import it, the nodemon returns webpack errors.
The structure is like this:
simple component structure
I have a 'site-statistics.component' with its html and scss files.
I have a script named 'google-analytics.ts' inside the subfolder "services".
site-statistics.component imports an exported function from google-analytics.ts
If the issue is my usage of the Google Analytics Data API client library, I want to know how I would be able get the response from the script and send it to my angular component.
Options I've tried, but failed:
Tried adding a resolve.fallback on webpack.config.ts. However, issue still persists.
Tried setting paths to each packages on my TSCONFIG.JSON.
Tried using react-scripts-rewired
If the issue is the way I use the Google Analytics Data API client library, I want to know how I would be able get the response from the script and send it to my angular component.
I am writing automation using Nightwatch node js. I have a test for uploading a file in my application and testing it locally works perfectly. However, when I test it using BrowserStack, BrowserStack cannot access the file in my local machine.
I have also tried setting FileDetector but it gives error saying setFileDetector is not a function on browser object.
I know this function is available for selenium driver object but I am javascript browser object for writing test scripts.
browser.setFileDetector(new remote.FileDetector());
I see that you want to perform the File Upload Operation for a file available on your local machine. You can review the link: https://www.browserstack.com/automate/node#enhancements-uploads-downloads for more details.
I want to take a screenshot of a React application webpage which opens at the following url when I run my application locally :
http://localhost:3400/someapi/email
I have unsuccessfully tried to take the screenshot with phantom (https://www.npmjs.com/package/phantom)
It failed because phantomJS has no support for ES6.
Also, I could not inject polyfill core.js (https://www.npmjs.com/package/core-js) to
the phantom js page with async await, as I am using Node v.6.9.1.
Any other alternatives/npm packages which makes this process of taking screenshot of a react webpage easy for me?
**Any detailed example would be much appreciated!
So I created a Zapier app with an action using the node package mongoose to update a document in a remote db. When I test it locally with Zapier test, it manages to complete the update, but when I test it on zapier.com for a zap, I get the error Cannot find module './drivers/node-mongodb-native/connection'
Clippings from zapier.com
I published a chrome extension to testers only. The app seems to work very well. I don't see any errors when inspecting the console for the popup or the background page. However, I get the following error when inspecting the console for any web page: "Uncaught Error: "getBackgroundPage" can only be used in extension processes. See the content scripts documentation for more extensions/schema_generated_bindings.js:418"
This app contains several JavaScript files, but each one includes the code within a self executing function. The "getBackgroundPage" calls are in the JavaScript files.
Could you please help? Isn't the app I built an isolated module independent from any web page? How can I prevent this error from happening?
I had the same error when I was trying to communicate with the background page from my content script. The correct way of doing it is via Message Passing. It is very well documented here : https://developer.chrome.com/extensions/messaging.html