webdriverio / codemod

A codemod to transform Protractor into WebdriverIO tests
MIT License
25 stars 12 forks source link

browser.saveScreenshot(filepath); - Why its not accepting filePath as outside of project Directory? #128

Closed Sweetie7 closed 3 months ago

christian-bromann commented 3 months ago

Can you please provide a description of your problem?

Sweetie7 commented 3 months ago

browser.saveScreenshot(filepath); Project directory - C:/Project filepath - C:/Logs/Screenshots/ name - project_QA_0416202408011234 browser.saveScreenshots(filepath+name.png);

Getting error as cannot find path to savescreenshot as its concatinating the path - 'C:/ProjectC:/Logs/Screenshots/'

christian-bromann commented 3 months ago

'C:/ProjectC:/Logs/Screenshots/'

This is not a valid path, I recommend use Node.js utilities like path.resolve(...). This doesn't seem like a WebdriverIO issue, therefor I will close it. I recommend to join the discord channel for questions like this.

Sweetie7 commented 3 months ago

That is what why its merging project directory path wit filepath?