spectron icon indicating copy to clipboard operation
spectron copied to clipboard

The argument of app can't contains absolutely path on Windows

Open luxuabc opened this issue 4 years ago • 2 comments

Hello,

I have defined an App with argument with absolutely path as below:

const app = module.exports = new Application({ path: process.env.appExec, // eslint-disable-line
	args: ['--feature-flag', 'OUTPUT_PERFORMANCE_FILE=C:\Users\Administrator\Documents\test\e2e\output\PerformanceOutput.txt'],
	webdriverOptions: {
		deprecationWarnings: false,
	},
});

When I start the app, it failed to start with error below: Screen Shot 2020-08-06 at 4 16 05 PM

But if I change the args with relative path, app start success.

const app = module.exports = new Application({ path: process.env.appExec, // eslint-disable-line
	args: ['--feature-flag', 'OUTPUT_PERFORMANCE_FILE=test\e2e\output\PerformanceOutput.txt'],
	webdriverOptions: {
		deprecationWarnings: false,
	},
});

Actually, If I run our App on Windows console with arguments as absolutely path, it works

MyApp --feature-flag OUTPUT_PERFORMANCE_FILE=C:\Users\Administrator\Documents\test\e2e\output\PerformanceOutput.txt

luxuabc avatar Aug 06 '20 08:08 luxuabc

My spectron version is 10.0.1

luxuabc avatar Aug 06 '20 09:08 luxuabc

i am also facing the same issue. My spectron version is 13.0.0. any work around?

Manisha-kannankot avatar Dec 14 '20 09:12 Manisha-kannankot