0

The test's domain is "exams.com/courses/XXXX"(xxxx is the course's #). After clicking the "buy course" button, the domain will be "payment.com".We filled in the payment information, and click the "pay" button, the webpage should be "exams.com/purchased_courses/XXXX". Now I used cy.origin:

it("buy courses",()=>{

 .........//click the "buy course" button

cy.origin("payment.com",()=>{

.........//fill in the payment information

cy.get('.submitButton-IconContainer').click() 
 //click the "pay" button

}) } )

Issue is: when running the testing, the webpage "exams.com/purchased_courses/XXXX" slashed a second, and finally, the webpage stays in "exams.com/courses/XXXX". Question:How can I let the testing shows "exams.com/purchased_courses/XXXX"? Thank you!

env: cypress 10.X.X typescripe node.js 18.8.0

yan yan
  • 1
  • 1

0 Answers0