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

    mysterious-belgium-25713

    10/24/2022, 10:47 AM
    Glad to be of service
  • b

    brief-midnight-25297

    10/24/2022, 5:45 PM
    solution worked like a charm 🙂 Thanks again
  • n

    narrow-policeman-70631

    10/24/2022, 6:00 PM
    Hi all, im Samira from Dominican Republic.
  • n

    narrow-policeman-70631

    10/24/2022, 6:08 PM
    If someone with experience in network calls, im trying to map a gift inside the URL in the network panel when inspect a public webpage, the field i want to validate is "cmd" and the test is to make a validation that guaranty that the cmd field is = to a specific value. The think is that when i try to intercept the URL, doesn't matter how i edit the code or what i try, it always give a time out error like cypress can not inspect those gift.
  • n

    narrow-policeman-70631

    10/24/2022, 6:09 PM
    here is one of the versions of my code.. it.only('Validate the service "cmd=PRE_INIT" in

    https://s2l.sendtonews.com/stn_trk.gifâ–¾

    ', () => { cy.visit('https://peterdev.sendtonews.com/demo/QA_test_player.html') cy.intercept({ method: 'POST', url: '/stn_trk.gif?*', query: { session: '2jW1INtvM0OzIdRf', age: '221021', }, hostname: 's2l.sendtonews.com', }).as('cmd') //cy.wait('@cmd').its('response.statusCode').should('eq', 200); cy.wait('@cmd').its('request.url').should('include', 'cmd') }) })
  • n

    narrow-policeman-70631

    10/24/2022, 6:12 PM
    i want to inspect all those 4 gift to validate the same cmd field. But cypress always give the same response.
  • n

    narrow-policeman-70631

    10/24/2022, 6:29 PM
    i think that the gift in the network tab, is not recognized by the command log in cypress...
  • g

    gray-kilobyte-89541

    10/24/2022, 7:26 PM
    are you sure your session query parameter is correct? I would not put anything into the query
  • n

    narrow-policeman-70631

    10/24/2022, 7:28 PM
    i understand, but i added that part because even without those parameters cypress gave me the same error
  • g

    gray-kilobyte-89541

    10/24/2022, 7:53 PM
    In that case I would start by reading https://on.cypress.io/intercept and the linked network requests guide. For detailed exercises covering network testing, I have made a paid course https://cypress.tips/courses/network-testing too
  • m

    mysterious-belgium-25713

    10/24/2022, 8:56 PM
    Hi Shamira, I wouldnt use those query params because they get generated each time. Also i'm having a hard time with cypress getting all 4 gif requests. I do however get one with the following code. Maybe you can tweak it more to your usecase.
    Copy code
    js
    describe('test', () => {
      it.only('Validate the service "cmd=PRE_INIT" in https://s2l.sendtonews.com/stn_trk.gif ', () => {
        cy.visit('https://peterdev.sendtonews.com/demo/QA_test_player.html')
        cy.intercept({
          method: 'POST',
          url: '/stn_trk.gif**',
          hostname: 's2l.sendtonews.com'
        }).as('cmd')
        cy.wait('@cmd').its('request.url').then((req)=>{
            expect(req).to.include('session')
        })
      })
    })
  • a

    acceptable-fall-11897

    10/24/2022, 9:35 PM
    Hey I want to delete one project and some data from MongoDB how can I delete.
  • b

    brave-river-4142

    10/25/2022, 12:16 PM
    Has anyone managed to use cypress in an application that has integration with SAP GUI system?
  • m

    mysterious-belgium-25713

    10/25/2022, 12:33 PM
    Can you remove this question from the other channels. You dont need to duplicate your question.
  • l

    limited-barista-33480

    10/25/2022, 3:05 PM
    Hey guys, someone who can help me how I could implement a mocking web push notification in Cypress, also I need to mock the cypress browser proxy. this to solve a problem with an automation test. any tutorial for this Thank you
  • f

    fresh-doctor-14925

    10/25/2022, 3:18 PM
    I think it would be a good investment for you to study Gleb's network testing exercises course. Very easy to follow, and it will save you from having to wait for help from the volunteer community https://cypress.tips/courses/network-testing
  • l

    limited-barista-33480

    10/25/2022, 4:45 PM
    @fresh-doctor-14925 Hey friend, thank you for your comments. I try to access the link you send me but it has problems hello friend, thank you for your comments. I try to access the link you send me but it has problems.
  • p

    proud-actor-30979

    10/25/2022, 5:47 PM
    I am having a loader screen of 20s before my actual page loads. I am having multiple tests where I have to again go through the loader screen by any chance is there a way in Cypress we can skip the loader screen ,store and load the page again between tests.
  • c

    cuddly-kitchen-97815

    10/25/2022, 5:54 PM
    If the act of loading the page isn't being tested, you can load the page in a
    before()
    hook before your tests so the tests can proceed without loading the page every time
  • e

    enough-fountain-35689

    10/25/2022, 5:58 PM
    we're attempting to consistently test our web app's frames per second. we already have a cypress test that works. we are looking into options for where to run the test where we can reliably get the same machine specs every test run. any suggestions?
  • g

    gray-kilobyte-89541

    10/25/2022, 6:20 PM
    Hmm, can you try reloading the page again? https://cypress.tips/courses/network-testing is working for me
  • p

    proud-actor-30979

    10/25/2022, 6:48 PM
    but this will clear the session for my second test and it will navigate to the default blank page.
  • k

    kind-artist-92362

    10/25/2022, 7:33 PM
    hi there! i have been trying to visit thirds site , seems that my logic works correctly , but seems also it is impossible for now . Could someone clarify it ? describe("Test task",()=>{ it("remove attr",()=>{ cy.visit("https://www.google.ru") cy.get( "input[name=q]").type("Yandex{ENTER}"); cy.get("a[href='https://yandex.by/']").first().invoke('removeAttr', 'target').click() cy.origin("https://yandex.by/", ()=> { cy.get( "form input[id=text]").type("byndyusoft{ENTER}"); cy.get("a[href='https://byndyusoft.com/']").first().invoke('removeAttr', 'target').click() cy.origin("https://byndyusoft.com/", ()=> { cy.get("section div[class='know-more__container'] span:nth-child(2)").click() cy.get(".popup-callback__footer-contacts [href='mailto:sales@byndyusoft.com']").should("have.text","sales@byndyusoft.com") }) }) }) })
  • m

    mysterious-belgium-25713

    10/25/2022, 7:35 PM
    Your second cy.origin should not be inside the other cy.origin. It's just like the error says
  • k

    kind-artist-92362

    10/25/2022, 7:36 PM
    i tried it outside but it does not work)
  • k

    kind-artist-92362

    10/25/2022, 7:38 PM
    i am doing it just for fully understanding of cy.origin
  • k

    kind-artist-92362

    10/25/2022, 7:38 PM
    )
  • k

    kind-artist-92362

    10/25/2022, 7:39 PM
    like it it is okay when second origin , but thirds idk )
  • k

    kind-artist-92362

    10/25/2022, 7:42 PM
    describe("Test task",()=>{ it("remove attr",()=>{ cy.visit("https://www.google.ru") cy.get( "input[name=q]").type("Yandex{ENTER}"); cy.get("a[href='https://yandex.by/']").first().invoke('removeAttr', 'target').click() cy.origin("https://yandex.by/", ()=> { cy.get( "form input[id=text]").type("byndyusoft{ENTER}"); cy.get("a[href='https://byndyusoft.com/']").first().invoke('removeAttr', 'target').click() }) cy.origin("https://byndyusoft.com/", ()=> { cy.get("section div[class='know-more__container'] span:nth-child(2)").click() cy.get(".popup-callback__footer-contacts [href='mailto:sales@byndyusoft.com']").should("have.text","sales@byndyusoft.com") }) }) })
  • k

    kind-artist-92362

    10/25/2022, 7:42 PM
    maybe smt with the site
1...128129130...192Latest