Feedback for @cypress/puppeteer Beta #28410
Replies: 12 comments 7 replies
-
Hello, I cloned the puppeteer folder (https://github.com/cypress-io/cypress/tree/develop/npm/puppeteer) on my local machine (Linux Ubuntu) and the examples do not work :/ I even tried to do a minimal test (just a console.log) and it do not work either :/ //cypress/e2e/hello.cy.ts
describe('Hello', () => {
it('hello', () => {
cy.puppeteer('logHello')
})
})
// in cypress.config
{
onMessage: {
async logHello(browser) {
return retry(() => {
console.log('HELLO')
return 'hello'
} )
}
} I join my log file |
Beta Was this translation helpful? Give feedback.
-
I got the same issue as like you |
Beta Was this translation helpful? Give feedback.
-
I thought a more "Cypress-native" implementation would be much better. Not sure how techincally possible that is but I think building something like cy.visit('/client1') // open first tab
cy.get('input').type('hello world{enter}')
// go to second tab
cy.tab('my second tab', () => {
cy.visit('/client2')
cy.get('[data-cy=incoming-message]').should('have.text', 'hello world')
}) I think Cypress DX is what people ultimately want. Lack of multi-tab support has a lot of workarounds, but the reason why people stay away from these workarounds is because they don’t want to leave Cypress DX. I haven’t dived too deeply into this, but at first glance it seems like this is not much different from using |
Beta Was this translation helpful? Give feedback.
-
I’ve tested it in a very silly project, and it works great. Next, I’ll try a real login scenario that opens a new tab or window. Thanks, Cypress team! |
Beta Was this translation helpful? Give feedback.
-
@jennifer-shehane, although the documentation mentions the compatibility with Electron, in a project I tried, it only works with Chromium web-based browsers (e.g., Chrome and Edge), not on Electron. See this CI failure as a reference. And here's the same run on the Cypress Cloud. To prevent that, I'm filtering for only chromium web-based browsers. |
Beta Was this translation helpful? Give feedback.
-
@jennifer-shehane , I created a test scenario where I believe this plugin would be essential. I left a folder in the project called “evidence”, containing a video and images of the problem. Link para projeto |
Beta Was this translation helpful? Give feedback.
-
I'm encountering a weird issue with trying to use the latest version (0.1.4). I'm essentially following the "Switching to a new tab" example in the readme, but without actually switching tabs and simply logging the page title, URL and content of the current page to the console. But, instead of the page under test being loaded in Puppeteer, I'm getting the Cypress test runner page. So for example:
Where 'MyCypressSample' is the name of my test pacakge. Also, if I I log the length of the pages array I get 1. I would expect that Puppeteer has access to the page under test as opened by cy.visit. Any pointers would be much appreciated. |
Beta Was this translation helpful? Give feedback.
-
Hi, I am trying to use this plugin to enable tracing. I am getting
|
Beta Was this translation helpful? Give feedback.
-
Hello! I have problems with types of the Browser. Browser property is passed by cy.puppeteer(); and the type of the browser they pass doesn't match with the official Browser type. The reason is: Could you fix it somehow? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@jennifer-shehane Iam trying to use cypress-puppeteer to take screenshots as the Cypress screenshots have an issue in taking fullPage of our app, with part of the page showing up as duplicated in the screenshot taken. I could see multiple issues have been raised on this already. With cypress-puppeteer, I could take the screenshots, but is there a way i could pass from Cypress which part of the browser that the screenshot needs to be taken ? Currently puppeteer takes a screenshot of the whole of the browser which includes the cypress run log on the left . |
Beta Was this translation helpful? Give feedback.
-
Why puppeteer and not playwright? I see playwright is already used for webkit automation |
Beta Was this translation helpful? Give feedback.
-
We released a @cypress/puppeteer plugin and we would like to gather feedback on how your experience is using the plugin. We intend to use this feedback to inform what improvements we could make, if any, to the plugin.
The main intention of the plugin is to allow a way for users to test some use cases of multiple tabs or windows, so that is our main focus when looking at feedback, but we'd be very interested to see other ways that you found it to be useful.
Please include any/all of the following:
Beta Was this translation helpful? Give feedback.
All reactions