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

    stale-park-86404

    07/22/2022, 9:17 AM
    Hi again, anyone encountered similar error before? - click (uncaught exception)TypeError: Cannot read properties of undefined (reading 'id') When I get('element').eq(0) , it appears that it can see the field I'm trying to get, but when I tried to click it, it then throw this error. Update: Found workaround here https://github.com/cypress-io/cypress/issues/18152 Cypress.on('uncaught:exception', () => false)
  • b

    best-glass-25152

    07/23/2022, 11:58 PM
    hello, I downloaded the cypress last version and when I try to run my tests all ok, but I try again, but my tests do not run because the cypress window says "does not respond", what's happen? what is the problem? help 😦
  • s

    shy-refrigerator-28608

    07/24/2022, 6:38 AM
    Hi guys, I'm new to cypress and the past few days I have been facing various errors in installing cypress. Today I started fresh and got a new error. Every time I run 'npx cypress open' the IDE pops up. But when clicking on a browser such as chrome, I get a blank chrome tab and the terminal shows an error 'GPU process exited unexpectedly: exit_code=34'. Does anyone know the reason why I'm facing this issue?
  • g

    gorgeous-pillow-31498

    07/25/2022, 5:11 AM
    hello is there any way to interact with metmask extension in cypress e2e testing
    m
    • 2
    • 3
  • m

    mysterious-motherboard-13344

    07/25/2022, 6:26 AM
    hello is there any way to interact with
  • f

    fresh-doctor-14925

    07/25/2022, 8:09 AM
    Your question is a little vague to give any meaningful suggestions at this point. What command are you using to run the tests? Which OS are you using? Can you paste in the error message or a screenshot?
  • w

    worried-pilot-52378

    07/25/2022, 10:03 AM
    I've setup a CI-style with github actions to review code in terms of formatting and eslint rules, however, whenever I run it I get the following error:
    Copy code
    npm notice Run `npm install -g npm@8.15.0` to update!
    npm notice 
    npm ERR! code 1
    npm ERR! path /app/node_modules/cypress
    npm ERR! command failed
    npm ERR! command sh -c node index.js --exec install
    npm ERR! Cypress cannot write to the cache directory due to file permissions
    npm ERR! 
    npm ERR! See discussion and possible solutions at
    npm ERR! https://github.com/cypress-io/cypress/issues/1281
    npm ERR! 
    npm ERR! ----------
    npm ERR! 
    npm ERR! Failed to access /root/.cache/Cypress:
    npm ERR! 
    npm ERR! EACCES: permission denied, mkdir '/root/.cache/Cypress'
    npm ERR! 
    npm ERR! ----------
    npm ERR! 
    npm ERR! Platform: linux-x64 (Debian - 11.4)
    npm ERR! Cypress Version: 9.1.1
    and in my .yml file I got the following:
    Copy code
    - name: "npm ci"
            run: >
              docker run --rm -v ~/.npm-docker:/root/.npm -v $(pwd):/app -w /app repo/tag npm ci
    any help would be very appreciated
  • a

    acceptable-hamburger-48790

    07/25/2022, 10:05 AM
    I see this in above error npm ERR! Cypress cannot write to the cache directory due to file permissions npm ERR! npm ERR! See discussion and possible solutions at npm ERR! https://github.com/cypress-io/cypress/issues/1281 npm ERR! npm ERR! ---------- npm ERR! npm ERR! Failed to access /root/.cache/Cypress: npm ERR! npm ERR! EACCES: permission denied, mkdir '/root/.cache/Cypress'. Meaning that there is problem with permission
  • w

    worried-pilot-52378

    07/25/2022, 10:09 AM
    sure, but how to fix it ?
  • a

    acceptable-hamburger-48790

    07/25/2022, 10:09 AM
    And this bug seems to be fixed in 10.3.1. version https://docs.cypress.io/guides/references/changelog
  • a

    acceptable-hamburger-48790

    07/25/2022, 10:11 AM
    Have a look into this thread https://github.com/cypress-io/cypress/issues/1281#issuecomment-403233215
  • n

    nutritious-lamp-42644

    07/25/2022, 1:06 PM
    HI, i am new to cypress and having issue, In my app a button click , send a request to server and create a new report ID, and load new page but when i do the same using using cypress, It do not load the page(Only create a report id) . I check the data in request Header , using Network help in browser debug windows. It show that cypress is not sending all the data in cookies with request
  • n

    nutritious-lamp-42644

    07/25/2022, 1:07 PM
    I am new , and please pardon , if this is not the right channel or format to raise the issue.
  • l

    loud-city-40050

    07/25/2022, 1:22 PM
    Testing setTimeout() components
    • 1
    • 2
  • l

    loud-city-40050

    07/25/2022, 7:41 PM
    cy.visit() error
    • 1
    • 1
  • a

    abundant-eve-90571

    07/26/2022, 7:59 AM
    HI, i am new to cypress and i am trying to run cypress but getting this error. would appreciate any clues or direction, thanks
  • f

    fresh-doctor-14925

    07/26/2022, 8:07 AM
    Usually this is because either: 1) you're not in the same folder as your
    package.json
    2) You haven't run
    npm install
  • a

    abundant-eve-90571

    07/26/2022, 8:11 AM
    ah i see
  • a

    abundant-eve-90571

    07/26/2022, 8:11 AM
    alright ill check that, thanks!
  • g

    green-book-63455

    07/26/2022, 10:50 AM
    Hi, I am trying to use the Window object to pass variables between a cypress test using request to get an authentication token from the backend and then passing that token to a svelte app so that, if cypress is running, can set the token. To do this, I have extended the Window object in svelte and imported this into cypress as well, to add extra properties like authToken. The result so far that request authenticates, receives the token and uses cy.window to set the win.authToken. The test then visits "/" - the svelte app. In the svelte app, if cypress is running then various store values are set from window.authToken (for instance). And the browser should go straight past the authentication screen into the main part of the app. But it does not, it goes to the login screen. Console.log show that the authToken is undefined. So the window found by cy.window() is not updating the window object in the svelte app. Any idea what I am doing wromg? If anyone wants code, just ask.
  • g

    gray-kilobyte-89541

    07/26/2022, 12:04 PM
    are you sure you are setting it on the right
    window
    object? Because if you do
    cy.visit
    after that, the new
    window
    object will be created, losing your auth token. You probably want to use
    onBeforeLoad
    to set the authToken, see https://on.cypress.io/visit options
  • m

    microscopic-soccer-23646

    07/26/2022, 1:31 PM
    Hello. I'm updating my projects to Cypress 10 but I'm getting this loading page infinitely. I've checked my node version is up to date etc, cleared out cypress cache and re-installed but still no further forward.
  • w

    white-lizard-79706

    07/26/2022, 3:23 PM
    Hi, I am trying to do an e2e test on my VueJS app that uses axios for API calls. In my vue component, in the mounted, i do an API call. My idea would be to mock this call with
    cy.intercept
    and
    cy.wait
    , however i can't make it work. On my local environment when i launch my frontend and backend servers, my test passes as the API call is made. However, the call is not silenced and the
    cy.wait('@apiCall')
    does not work. Also my test does not work in Github Actions, i have this error :
    AxiosError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.
    . I have the impression that github actions need a special ci environment file but i don't know where to tell cypress to look into those env variables when in continous integration. Anyone had the same issue or knows about cypress X axios X github actions combined ? Some of my code :
    test.cy.js
    Copy code
    cy.intercept('GET', '/coaches/coach-informations/30283', {
                data: {
                    email: 'hello@hello.com',
                },
            }).as('getCoach')
    
     cy.visit('/hello?coach=30283')
    
    cy.wait('@getCoach')
  • a

    acceptable-hamburger-48790

    07/26/2022, 5:51 PM
    Could be permission issue, when you see the loading page, can you check what you see in the cypress test runner ? If there is permission issue, then you would see an exception
  • m

    mysterious-kitchen-59722

    07/26/2022, 8:38 PM
    Hello All, I started fresh project with cypress 10.3.0 and Cucumber , but facing below error when trying to run the test, any insight?
    • 1
    • 1
  • e

    early-dentist-91255

    07/27/2022, 6:57 AM
    Hello All, I have had a positive experience with Cypress for several years now. Recently, I attempted to migrate to Cypress 10.x and I am facing an issue on Chrome and Chromium, but not on Webkit. Upon loading a given page, the front-end of the application under test normally sends xhr requests to multiple domains (the dedicated back-end but also some online service to get some map tiles). When running the tests with Cypress 10, the front-end only sends requests to the dedicated back-end but does not send any of the map-related requests (which correspond to another domain). Do you have any idea what could cause that and what could cure this issue? By the way, I am already setting "chromeWebSecurity": false in my config. Thanks for your support 🙂
  • l

    loud-city-40050

    07/27/2022, 9:12 AM
    Cognito Login Fetch Stuck
    • 1
    • 3
  • b

    brief-midnight-25297

    07/27/2022, 10:10 AM
    Hello, I just joined the cypress world ~1.5 months ago and I have a question that I was hoping one of you guys might answer. So here it is.. I have to create custom test data for an SAP/ERP application and analyzing the possibilities, also highlighted by @gray-kilobyte-89541, I decided that the one that fits the most is by using the API's to create it then at the end of each test run delete it by using the DELETE endpoint of these api's. Now, when we create custom data via the API's usually the body of the api contains the json object in a custom shape (representing the data). I am therefore not sure what is the best way of keeping this data because as I see I have two alternatives: 1. either use constants to define an object in JS (export const paymentCodeData = {}) 2. use simple JSON files and append them to a method's param that represents the body in a for each loop How do you do it? How do the fixtures play a role in this given that the data will be created via an api (POST) then read the data in via a GET and at the end use the created data retrieved with the GET request? Many thanks in advance!
  • w

    wide-hospital-71307

    07/27/2022, 10:31 AM
    Hey guys, trying to migrate to cy.session but every time a new it step begins, i am left on a blank page. How can I avoid this? In my e2e tests I have multiple steps that go through different flows, on different pages, but all of this is done from a single initial cy.visit, not in every it step
  • w

    wide-hospital-71307

    07/27/2022, 10:32 AM
    basically I want to log in once and just do my job, don't want to tell the app where to go on every step, it goes to the page it is supposed to go to, because of the actions it is performing, which is normal
1...747576...192Latest