0

I have an HTML file which I want to upload in Cypress project and then run it(as we open in browser any html file)and do automation stuffs on the opened html file.

Sudhi
  • 1
  • 1

1 Answers1

0

Just visit using the relative path (from project root) cy.visit('./test.html') Note that to make this work, you shouldn't add baseUrl prop to the 'cypress.json' file

Musafiroon
  • 623
  • 6
  • 20
  • I am not looking for directly putting a path to visit that html file `cy.visit('./test.html')` rather I want to upload a html file with automation and then run the html file by `cy.visit('uploaded.html')` – Sudhi Oct 21 '22 at 11:09
  • can you please tell what is the type of your file (local,Buffer,text,etc) – Musafiroon Oct 22 '22 at 04:57