cypress-io / cypress-chrome-recorder

Export Cypress Tests from Google Chrome DevTools' Recorder
MIT License
226 stars 18 forks source link

Error reported in output file #40

Open ChrisSaturday opened 1 year ago

ChrisSaturday commented 1 year ago

environment: Windows system step: when execute npx @cypress/chrome-recorder D:\workspace\UIAutoTest\cypress811\cypressuinew\cypress\e2e\recording\record.json -o=D:\workspace\UIAutoTest\cypress811\cypressuinew\cypress\e2e\recording error detail: Running Cypress Chrome Recorder on D:\workspace\UIAutoTest\cypress811\cypressuinew\cypress\e2e\recording\record.json There was an issue writing the output to D:\workspace\UIAutoTest\cypress811\cypressuinew\cypress\e2e\recording. Please check that it exists and try again.

szykov commented 7 months ago

it was interesting to find out what is it. seems to be the problem is that on windows and on unix-like systems it uses different type of slashes. in order to make it work you need to use always '/' instead of '\'.

https://github.com/cypress-io/cypress-chrome-recorder/blob/953a6d46012b392e6cb25fe2f6f35a546b88a752/src/cli/transforms.ts#L98C28-L98C28