https://cypress.io logo
Hi Shamira, I wouldnt use those query params becau...
# e2e-testing
m
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')
    })
  })
})