https://cypress.io logo
Join Discord
Powered by
# help
  • s

    silly-laptop-48411

    09/16/2022, 8:50 AM
    I have
    cy.intercept('GET', '**/foo/**/bar').as('getSomething');
    which returns 200 as expected with
    cy.wait('@getSomething').its('response.statusCode').should('eq', 200);
    . However when I re-run the same test in Cypress (v7.7.0, browser Chrome 105) that same call fails due to
    statusCode = 304
    . If I stop then start the test, the first time passes but always the subsequent executions return 304. I would always expect that for each time the test is run the response is 200. Why does the HTTP status change and how do I stop this for this and all tests?
  • c

    cold-van-45410

    09/16/2022, 9:22 AM
    How to handle pdf window in cypress? When I am click on btn pdf window is opening
  • l

    lively-eve-50395

    09/16/2022, 9:50 AM
    Hi all, I am using chai-json-schema to validate the response body of an API with the JSON object that is saved in a JSON file. The case is that even if I changed the schema keys and data types, the test passed. I can't understand where the issue is. Does anyone get the same issue anytime, please?
  • l

    lively-eve-50395

    09/16/2022, 9:52 AM
    The Schema
  • l

    lively-eve-50395

    09/16/2022, 9:53 AM
    way that I used to validate
  • a

    acceptable-hamburger-48790

    09/16/2022, 10:28 AM
    You might need to enable the followRedirect flag https://docs.cypress.io/api/commands/intercept#Request-object-properties
  • p

    prehistoric-restaurant-72560

    09/16/2022, 1:02 PM
    How to handle pdf window in cypress
  • g

    gray-kilobyte-89541

    09/16/2022, 1:28 PM
    you fetch (async operation) inside a
    .should
    callback? That is not going to work
  • l

    limited-gold-56062

    09/16/2022, 1:44 PM
    Hi guys, I'm trying cy.origin with b2clogin but cy.get cannot find any elements in the login page
  • l

    lively-eve-50395

    09/16/2022, 1:53 PM
    Does anyone get this error when reading a fixture? RangeError: Maximum call stack size exceeded cypress version 10.7.0
  • m

    melodic-bear-95863

    09/16/2022, 2:01 PM
    Hello Guys, could u please help me to figure it out how to check if the website contains 3 sliders in div using cypress. describe("Test number 1", () =>{ it.only("Test whether the Home page has Three Sliders only", () => { cy.visit("https://practice.automationtesting.in/"); cy.get("#site-logo").click(); cy.get("#n2-ss-6").should("have.class", "n2-ss-slider n2-ss-load-fade n2-ss-loaded n2-ss-tablet") })
  • f

    fierce-easter-87739

    09/16/2022, 4:23 PM
    okay my first instinct was minmatch is probably not matching, but I was able to validate that it actually does by calling Cypress.minmatch() and passing partially unencoded url into it. Also I tried doing intercept("*").as("tst") and all calls except that one gets aliased and caught. So not sure why it would not catch that call. ๐Ÿค”
  • n

    nutritious-army-46708

    09/16/2022, 4:31 PM
    I want to get the string: emailaddress from cy. origin(). Does anyone have ideas? I transfer args()in origin, and change the value of emailaddress in the origin, but the value is still test@test out of cy.origin(). Thank you so much!
  • g

    gray-kilobyte-89541

    09/16/2022, 6:48 PM
    yield it from the origin https://on.cypress.io/origin, I mean it is the result of the last command, so you could simply do
    Copy code
    js
    cy.origin(..., () => {
      cy.visit('/')
      cy.url()...
      cy.request(...).its('body')
    }).then(emailAddress => {
      ..
    })
  • s

    sticky-judge-13753

    09/16/2022, 7:21 PM
    Hi My test runner is not updating/reflecting the project written in the visual studio. could ypu please let me know what need to be done. Thanks in advance.
  • n

    nutritious-knife-49146

    09/16/2022, 8:38 PM
    Hi! Has anyone been able to run cypress tests in parallel with codebuild?
  • n

    nutritious-army-46708

    09/16/2022, 9:01 PM
    Thank you so so much! I believed that I saw many your videos and blogs about cypress. Would you please suggest some lectures. I used to use Java and have no idea about javascript and typescript. It is difficult for me to write even simple code in cypress.
  • g

    gray-kilobyte-89541

    09/16/2022, 10:10 PM
    - https://docs.cypress.io/faq/questions/general-questions-faq#What-resources-do-you-recommend-to-learn-JavaScript-before-writing-Cypress-tests - take my free course https://cypress.tips/courses - look through examples and recipes at https://glebbahmutov.com/cypress-examples - i usually learn myself by looking at examples
  • n

    nutritious-army-46708

    09/16/2022, 10:56 PM
    Got it! Thank you so much!
  • i

    icy-exabyte-68383

    09/17/2022, 7:05 PM
    hey, how in the world would you get this input: because class, id and describedby are changing every time the page gets opened (angular). There is a label ahead of it, but when i click() it, the textinput gets modal - but when i type() it trys to write onto the label which ofc doesnt work. i am starting to get desperate ๐Ÿ™‚ Thanks a lot in advance
  • i

    icy-exabyte-68383

    09/17/2022, 7:08 PM
    What could work is 1) Click on the label 2) get input which has modal state 3) type into it But I am not sure if there is a "get something which has modal state" command, at least I couldnยดt find it
  • e

    eager-london-10753

    09/17/2022, 8:22 PM
    Hi Team! I trying ro fetch each test status in the aftereach hook using this.test.state and i get an undefined. Is there way to get the status of each test ?
  • i

    icy-exabyte-68383

    09/18/2022, 6:36 AM
    Has anyone an idea?
  • s

    strong-cat-47196

    09/18/2022, 10:53 AM
    Hi! I trying to run tests locally with the Dashboard. I have about 250-300 tests. Every time it's just stuck in the middle after less than half of the specs or it's failing with timeout. How can I check where is the problem, I feel like something taking all of the browser memory or something. Does is happen to anyone else?
  • f

    few-farmer-48800

    09/18/2022, 4:25 PM
    I need to look at material, but can't you pass an ID to the inner input that doesn't change? Or, if you just set a [data-cy] on the container element, that should do it, you would just need to grab that element and then .within or .find from there.
  • m

    microscopic-toddler-9116

    09/18/2022, 5:41 PM
    Hi I am new to Cypress and here Cypress is not able to find chrome in my system how to resolve this ?
  • f

    few-farmer-48800

    09/18/2022, 6:30 PM
    Hey @microscopic-toddler-9116 ! Have you taken a look at this? https://docs.cypress.io/guides/references/troubleshooting#Launching-browsers
  • m

    microscopic-toddler-9116

    09/18/2022, 7:06 PM
    Thank you so much. I think i found the problem it is because chrome is installed at some other path. @few-farmer-48800
  • i

    icy-exabyte-68383

    09/18/2022, 7:18 PM
    the dev will have to put id onto the elements, yes. But I wanted to avoid that and just go on without waiting on monday ๐Ÿ™‚ But thats probably not possible
  • o

    orange-cricket-43285

    09/18/2022, 8:33 PM
    Hello how are you, Could any of you please help me, I have the following error when executing my tests. the error is passed when i try to do the (storage.set). the code stopped working after an update. ๐Ÿ˜€
1...147148149...252Latest