i am using exec for executing some DOS commands:
java -jar D:\selenium\selenium-server-standalone-2.40.0.jar -htmlSuite "*firefox3 C:\Users\AppData\Local\Mozilla Firefox\firefox.exe" "http://google.com" "D:\selenium\TS2.html" "D:\selenium\Res3.html"
like
exec(['java','-jar','D:/selenium/selenium-server-standalone-2.40.0.jar','-htmlSuite','"*firefox3','C:/Users/AppData/Local/Mozilla Firefox/firefox.exe"','"http://google.com"','"D:/selenium/TS2.html"','"D:/selenium/Res3.html"'], function(err, out, code) {
});
showing error as
HTML suite exception seen:
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
Please help me in executing this command thanks in advance :)
The value of the -htmlSuite parameter is broken in two pieces.
And you probably shoud use backslashes in your pathnames (because you're on dos/win):
exec(['java','-jar','D:\\selenium\\selenium-server-standalone-2.40.0.jar','-htmlSuite','"*firefox3 C:\\Users\\AppData\\Local\\Mozilla Firefox\\firefox.exe"','"http://google.com"','"D:\\selenium\\TS2.html"','"D:\\selenium\\Res3.html"'], function(err, out, code) {
});