Questions tagged [jest-puppeteer]

121 questions
0
votes
1 answer

pupeteer not able to navigate to a new URL after clicking on button on jenkins

After clicking on a button puppeteer not navigating to new URL. console.log(this.page.url);//current URL await this.utils.click(this.page, '[trackid=navigation_primary_button] :not([disabled])' ); console.log(this.page.url);//current URL // expected…
user10478566
  • 37
  • 12
0
votes
2 answers

Jest-Puppeteer test with React doesn't type text in input

I have an app created from "create-react-app", and i've added puppeteer for running end-to-end tests. While trying to run a test for logging in, I am not able to type text in the log in form inputs. jest-puppeteer.config.js: module.exports = { …
Asaf David
  • 3,167
  • 2
  • 22
  • 38
0
votes
0 answers

Puppeteer doesn't work correctly in headless: true

I have a test case that selects publication from list and clicks retweet button on it to trigger modal which is then inserted into DOM and has 2 buttons, Confirm and Cancel. In headless: false - everything works as expected, modal is displayed and…
0
votes
1 answer

Jest test doesn't create the files the normal program would

I'm using node and puppeteer to load a page, get its content and then create a screenshot if it. At the end of the run function I have the following lines var content = fs.writeFileSync(outputFilePath, processedContent); var screenshot =…
Susy11
  • 260
  • 1
  • 3
  • 15
0
votes
0 answers

Is there a way to select a dropdown using its display name where the dropdown is populated from the database not from a HTML?

I was wondering if there was a way to select a selection from the dropdown menu where all the selection is populated from the database and does not have any selectors. As it does not have any selectors we cannot use await…
Denish
  • 73
  • 1
  • 8
0
votes
1 answer

Jest functions export

I'm using jest+puppeteer and I have a code that I'd like to reuse across my project. I use the following instruction: https://jestjs.io/docs/en/getting-started //adminLogin2.js const admLog = function admLog () { return …
DanilD
  • 1
  • 1
0
votes
1 answer

Check the page's content after a reload on Jest with Puppeteer

I'm developing a nodejs library similar to live-reload/browser-sync and I'm using jest-puppeteer for the automated tests. When I manually test my library, opening the browser and modifying a file, voilá, the pages refreshes (through an injected code…
Paulo Coghi
  • 13,724
  • 14
  • 68
  • 90
0
votes
1 answer

UI seems different on puppeteer

Even though most of the process of my end-to-end test with puppeteer works fine ( which is a rather simply a series of page.select/type/waitfor/etc) the UI seems skewed. When the process is over, at the very end of it the UI readjusts to what it…
Return-1
  • 2,329
  • 3
  • 21
  • 56
0
votes
0 answers

mouse down and take a screenshot of an element

I am trying to simulate a mousedown action on an element then take a snapshot but this doesn't seem to work as the screenshot isn't what I expect. according to the api docs, this is what it does mouse.down([options]) options button…
0
votes
1 answer

Using puppeteer, how can i wait for specific xhr request to be complete

I'm testing my react app and I want to check if XHR request from my app is sent. When I use page.waitFor(5000), it will sometimes work but sometimes not. Is there a better way to make the code wait for XHR to be complete or to be resolved?
-1
votes
2 answers

Why does puppeteer headless testing open browser?

I thought I understood what headless was in jest-puppeteer. I understood it to be a way to run tests without running through the tests in the browser. When I look at this documentation headless testing it suggests that the browser is still involved…
slipperypete
  • 5,358
  • 17
  • 59
  • 99
-1
votes
1 answer

Cannot use import statement outside a module calling values from another file

Unable to Resolve the Import issue, already have type = module added in package.json file import { env, username, password, panel } from "../DemoAutomationProject/config"; ^^^^^^ SyntaxError: Cannot use import statement outside a module at…
prit
  • 41
  • 8
-1
votes
1 answer

How to run single test file in jest puppeteer e2e testing?

I am new to puppeteer automation testing, Can anyone please tell me how to execute only one test file.
Deobrat Singh
  • 15
  • 1
  • 4
-1
votes
1 answer

Let Puppeteer wait for globalSetup to finish

I use Jest-Puppeteer to end2end test a webapplication. All tests run parallel with async functions. Now I find that the first test already runs before the globalSetup has finished and the data preperation is done (initializing client-settings…
Jelle Schräder
  • 185
  • 2
  • 13
-3
votes
1 answer

Stuck on generating a coverage report for the e2e test

I have written E2E tests using Jest, Puppeteer, and ReactJS for a Chrome extension. And I am not getting how can I generate its coverage report. Nothing seems to be working. I tried generating coverage reports with the jest-puppeteer-istanbul…
1 2 3
8
9