https://cypress.io logo
Join Discord
Powered by
# e2e-testing
  • s

    stale-optician-85950

    09/20/2022, 8:52 PM
    Have you followed these recipes: https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/fundamentals__dynamic-tests-from-csv or https://medium.com/@you54f/dynamically-generate-data-in-cypress-from-csv-xlsx-7805961eff55
  • m

    mysterious-belgium-25713

    09/20/2022, 9:01 PM
    Cypress 10 and connecting to an Oracle d...
  • a

    alert-student-86536

    09/21/2022, 12:05 AM
    Hello. I ask everyone for a help with my problem: I started to learn Cypress and have some bug with blank page when cypress visit address. How to solve it?
  • a

    alert-student-86536

    09/21/2022, 12:07 AM
    test work fine, but I don't see anything on screen.
  • a

    alert-student-86536

    09/21/2022, 12:09 AM
    this I can see directly in browser:
  • a

    alert-student-86536

    09/21/2022, 12:10 AM
    and everything looks fine until i run the test
  • b

    broad-rain-59097

    09/21/2022, 5:50 AM
    Hi Team , Whiles testing login functionality on our application, After clicking on login - It redirects to Microsoft login - authentication page .... the page remains blank and only MS url is shown... Error Im getting is
  • b

    broad-rain-59097

    09/21/2022, 5:52 AM
    However, added 'experimentalSessionAndOrigin' and 'experimentalStudio' as TRUE in - cypress.config.js
  • b

    broad-rain-59097

    09/21/2022, 5:52 AM
    const { defineConfig } = require("cypress"); module.exports = defineConfig({ chromeWebSecurity: false, projectId: 'qsyx7s', e2e: { setupNodeEvents(on, config) { // implement node event listeners here }, "experimentalSessionAndOrigin": true, "experimentalStudio": true, }, });
  • b

    broad-rain-59097

    09/21/2022, 5:52 AM
    Can someone help me with this ????
  • f

    full-controller-29537

    09/21/2022, 3:33 PM
    Hi All! In my tested app I'm using a WebGL based library I need to test. Since I cannot use visual testing for various reasons, I have exposed the library to the global namespace and I'm trying to spy on calls to this library methods. Some methods are asynchronous, though. I wasn't able so far to create a spy on a library method and verify its returned RESOLVED value was correct. If not - I need this to fail my whole test, naturally (some tests remain green though parts are failing):
  • f

    full-controller-29537

    09/21/2022, 3:39 PM
    Hi All! In my tested app I'm using a WebGL based library I need to test. Since I cannot use visual testing for various reasons, I have exposed the library to the global namespace and I'm trying to spy on calls to this library methods. Some methods are asynchronous, though. I wasn't able so far to create a spy on a library method and verify its returned RESOLVED value was correct. const fgspy = cy.spy(chart, 'foreground'); cy.get('.myButton').click(); fgspy.getCall(0).returnValue.then( res => { expect(fgRes.whatever).... }); I tried using WRAP but I had a couple of issues there: first - test was green though it failed assertions, second - I had a typing issue (working in TS). Any assistance will be much appreciated 🙂 !!!
  • m

    microscopic-fish-5767

    09/21/2022, 6:38 PM
    Hi!! You try with another url? so you can see if there is a problem of the test or cypress
  • m

    microscopic-fish-5767

    09/21/2022, 6:40 PM
    you can watch this tutorial, it´s great:

    https://www.youtube.com/watch?v=uIX8nHBfo-o&list=PLYDwWPRvXB8-8LG2hZv25HO6C3w_vezZb&index=1&t=3sâ–¾

  • l

    limited-barista-33480

    09/21/2022, 9:11 PM
    Hi team! someone who can help me with this error when executing a spec.cy.js. It's been several days and I haven't found a solution to this problem. Error: Webpack Compilation Error ./cypress/cert_pre/AmazonRootCA1.pem 1:4 Module parse failed: Assigning to rvalue (1:4) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
  • b

    brief-restaurant-78755

    09/22/2022, 12:22 AM
    Hi Team I got the same error as @limited-barista-33480 funny thing is that I was working on creating my test cases when suddenly it would not run that cy file and will give the error. Webpack Compilation Error ./cypress/POM/jobBriefPage.js Module not found: Error: Can't resolve 'cypress/types/jquery' in 'D:\Users\vhernandez\Docum resolve 'cypress/types/jquery' in 'D:\Users\vhernandez\Documents\Winmill\Cypress_Tests\cypr Parsed request is a module using description file: D:\Users\vhernandez\Documents\Winmill\Cypress_Tests\package.json Field 'browser' doesn't contain a valid alias configuration Looked for and couldn't find the file at the following paths:
  • v

    victorious-father-41976

    09/22/2022, 7:02 AM
    Hey @limited-barista-33480 and @brief-restaurant-78755 , are you folks sure you haven't updated the Cypress to v10 in the meantime? If so, maybe you could double-check if you properly load the plugins file in that new version via
    setupNodeEvents
    . In order to make aliasing work in webpack, those need to be properly configured, and since v10, the plugins are no longer loaded by default. Here're the links to the docs: https://docs.cypress.io/guides/references/configuration#setupNodeEvents and https://docs.cypress.io/guides/tooling/plugins-guide#Using-a-plugin.
  • w

    wooden-football-97129

    09/22/2022, 7:40 AM
    Hello. I have a test where I need to fill an iframe (Stripe payment iframe) where I enter credit card number,expiration date and cvc. My test works in following situations: 1. Cypress on local and remote env My test DOES NOT work in following situation: 2. Cypress as instance in gitlab CI/CD (gitlab runner) and the same remote env My code to access iframe cy.get(".__PrivateStripeElement > iframe").within(function($iFrame){ cy.wrap($iFrame.contents().find('body')).find('#Field-numberInput').type('4242').type('4242').type('4242').type('4242') cy.wrap($iFrame.contents().find('body')).find('#Field-expiryInput').type('12').type('34') cy.wrap($iFrame.contents().find('body')).find('#Field-cvcInput').type('123').type('{enter}') });
  • w

    wooden-football-97129

    09/22/2022, 7:49 AM
    My error message on dashboard
  • v

    victorious-father-41976

    09/22/2022, 8:02 AM
    Hello
  • l

    limited-barista-33480

    09/22/2022, 1:39 PM
    Hey @victorious-father-41976 , now I have made some configurations of the awsit certificates and I have this problem when running a test from cypress in version 10. I don't know what this problem could be.
    v
    • 2
    • 1
  • n

    nutritious-megabyte-64190

    09/22/2022, 3:22 PM
    is anyone on version 10.x.x (10.8.0 for me) actually getting https://github.com/mfrachet/cypress-audit this to work properly? I have followed all directions here: https://mfrachet.github.io/cypress-audit/guides/lighthouse/installation.html#installing-the-dependency Here: https://glebbahmutov.com/blog/cypress-lighthouse/ but nothing gives. mostly my task just times out and it also opens up a new browser window every time which i believe isnt correct
  • a

    acceptable-hamburger-48790

    09/22/2022, 5:10 PM
    so what is the error, im using with latest version of cypress and i dont see any issues
  • a

    acceptable-hamburger-48790

    09/22/2022, 5:11 PM
    this example is working well https://github.com/mfrachet/cypress-audit/tree/master/examples/cra-authenticated
  • c

    clean-nightfall-72091

    09/23/2022, 9:29 AM
    Hello I have a question regarding the use of custom classes with cypess e2e. I'm using Cypress with Typescript and have a Web-Page consisting of loads of different forms. I want to capsule every form and it's corresponding inputs into a custom class, which I then wanna use to write custom commands for easily checking different interactions of the forms. E.g.: I have a form consisting of three inputs with the ID's [firstname, lastname, birthplace]. I write a custom typescript class:
    Copy code
    class Form{
      firstname?: string
      lastname?: string
      birthplace?: string
    
      constructor(...){...}
    
      setAllWrong(){
        this.firstname = ""
        this.lastname = ""
        this.birthplace = ""
      }
    }
    Now I declare a custom command:
    Copy code
    Cypress.Commands.add(
        'fill_all_correct',
        (data: Form) => {
            ...
        }
    )
    And define it insinde the `index.ts`:
    Copy code
    declare namespace Cypress {
      interface Chainable{
          fill_all_correct(data: Form): Chainable<Element>,
      }
    }
    Cypress is now giving me a
    ReferenceError: Form is not defined
    when using it inside a test.
    Copy code
    specify('Test', () => {
             const form= new Form()
             ...
        }
    Importing the
    Form
    Class inside the test, command and index file leaves me with an
    Type 'Chainable' is not generic.
    inside the
    index.ts
    . Can anybody identify what I may be doing wrong and what I should do instead ? I hope I could picture the problem for all of you.
  • n

    nutritious-megabyte-64190

    09/23/2022, 1:26 PM
    my task sometimes times out, and when i see this actuall give LH results, its usually on my retry ( i have 2 retries) 1st one times out and somehow the 2nd one will run it when i set my specific it block to 0 retries it just times out, il try that example you provided, Thanks!!
  • b

    brave-river-4142

    09/23/2022, 2:19 PM
    hello, has anyone managed to perform a test where the mouse can drag a card to a container? trello card example
  • n

    nutritious-megabyte-64190

    09/23/2022, 2:32 PM
    im using something like this, but it doesnt work for everything
    Copy code
    cy.get(`#widget-edit-0-drag-handle`)
        .click()
        .trigger('mousedown', {which: 1, pageX: 0, pageY: 0});
    
    cy.get(`#widget-edit-0-drag-handle`);
        .trigger('mousemove', 100, 100, {force: true})
        .trigger('mouseup');
  • b

    blue-glass-15094

    09/23/2022, 5:24 PM
    Hi all! Is there some guide that people can point me to that works with iframe for Cypress 10? Been looking around and do try and error and having no success, so far.
  • m

    miniature-bear-37232

    09/23/2022, 8:03 PM
    Hi, I'm a little new to cypress but had a question regarding optimizing a block of locators with a similar name. The locators are in a dedicated locator file that is called from the main test script(similar to page object model). This is an example of the locators:
    Copy code
    drawerAccordianContent1:
        '[data-testid="drawer-accordion-description-1"]',
      drawerAccordianContent2:
        '[data-testid="drawer-accordion-description-2"]',
      drawerAccordianContent3:
        '[data-testid="drawer-accordion-description-3"]',
      drawerAccordianContent4:
        '[data-testid="drawer-accordion-description-4"]',
      drawerAccordianContent5:
        '[data-testid="drawer-accordion-description-5"]',
1...105106107...192Latest