I couldn't find a similar question here. We have been piloting Cypress for our E2E tests. One thing that is not overtly obvious but feels problematic is the fact that in the videos that are being recorded by Cypress, any secret texts (passwords) that are being typed in are being logged in the video recording. Have folks run into this issue before? Is there a way to fix this?
If your webpage itself is not showing cleartext. There is a way to hide from cypress commands.
Add
cy.get('yourelement').type('password',{log:false});
Then you can see the command is hidden.
see cypress doc.
Related
I am kind of new here, although I read often the posts, that is why, first of all, a big thank you for all the help we get here. If there is someone using Cypress, I have a problem with accessing a print dialog which is outside the DOM. I want to close the print dialog but I cannot access it using the Cypress commands. I had the same problem with Python and Selenium, but there I managed to install AutoGui and this helped me out.
Anyone had the same problem and found a solution to it? Thank you in advance.
** **
We are using grapesjs to create an application editor. We want to validate that all the components we create can be used in Grapesjs. To do it, we want to write e2e tests using UI to simulate a final user. I'm using Cypress for automation but didn't have any luck dropping block inside the grapes iframe. Any help regarding this would be highly appreciated.
Me and my coworker tryied for 2 weeks, both Cypress and the rest of the tools on the market couldn't drag and drop a block of GrapesJs inside it's iframe :/
You can follow the issue from GrapesJs: https://github.com/artf/grapesjs/issues/3721
And a discussion i opened in Cypress's repo:
https://github.com/cypress-io/cypress/discussions/17979
Last month, i find this option, but i didn't try to set it as false on grapesjs.init, can you test it?
https://github.com/artf/grapesjs/blob/dev/src/editor/config/config.js#L111
I am trying to automate a website using cypress and I came across a problem where in I have to handle below tag. On click, new window gets opened which gets displayed out of the test runner.
a href="javascript:ContextTradeMenuPopup('View/Edit Trade')">View/Edit
Trade /a
I understand Cypress does not support multi window but as a workaround I can get the href tag and copy the URL and can open the URL in same runner, but in the above example there is no URL.
Can anyone help with different ways available in Cypress to handle multi window/ multiple tab behavior.
Thanks!
The work around you mentioned is currently the only work around that is available. So you should retrieve the URL of the new window/tab and visit that directly. If you can't do that you sadly can't automate it.
I tried to use Phantomjs for taking screenshots of my SPA. As per my requirement, i should be able to take screenshot of part of the page rather than whole page. The png/image works fine with phantom but the PDF is not working. I'm trying to see if it's possible to do a part of the page(not the whole page) as PDF export with Puppeteer. I checked their documentation but nowhere it was mentioned.
Has anybody tried to achieve the same with puppeteer?
Thanks
As far as I am aware, you can take screenshots of specific parts of the screen using the clip options for the screenshot method. You can read about it in the docs here.
It's not possible to do the same with the pdf method. The relevant docs are here.
I am trying to show Jasmine SpecRunner style page using karma-jasmine, karma and gulp plugins but not able to see all the specs listing all of the test that passed on failed. I used karma-jasmine-reporter node module to get a report of the tests that ran but how can I rerun an individual test. I am looking to generate a page like this where I can see the result and rerun individual tests.
I've found that https://www.npmjs.com/package/karma-jasmine-html-reporter the karma-jasmine-html-reporter is the best UI reporter that gets close to the default jasmine html file look.
Your question is old, but it's what I was trying to find myself.
If you found a better solution since posting I'd like to know. One thing that this HTML reporter doesn't do is refresh if you updated the tests.
So if you run 'karma start' then it will run the tests, open your browser then you have to click on the debug button to show the UI reporting of your tests.
Then if you update the tests, the cmd window will refresh to reflect your new tests but the browser window will not. You must refresh it manually. Would be awesome to not have to do that.