This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Please try to create a HTML5/JS sample project AngularJSPhoneCatalog and invoke NPM install. If you go to Project Properties -> Selenium Testing and select Protractor, it sets path to Protractor to the bin folder. If you try to run the tests, it prints "C:\Program Files\nodejs\node.exe" "C:\Users\vlriha\Documents\NetBeansProjects\AngularJSPhoneCat6\node_modules\protractor\bin\protractor" "C:\Users\vlriha\Downloads\netbeans-trunk-nightly-201501060001-php\netbeans\webcommon\protractor\netbeans-configuration.js" Using ChromeDriver directly... Done. and nothing happens. Nothing weird in IDE log Thank you Product Version: NetBeans IDE Dev (Build 201501060001) Java: 1.8.0_11; Java HotSpot(TM) 64-Bit Server VM 25.11-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
It works for me as expected in latest build. Chrome is fired, tests are running and I get results in the test results window. I saw another issue though: When there is a failure stacktraces are not recognised and thus no link is provided in the output and no navigation is provided in the results window. Will be fixing this. Thank you
Hm, I cannot even start Protractor on Windows from IDE. How do you start it? Which file do you use as Protractor binary? If I select protractor.cmd, it does not work because IDE invokes "C:\Program Files\nodejs\node.exe" "C:\Users\vlriha\Downloads\sample_protractor\AngularJSPhoneCat6\node_modules\.bin\protractor.cmd" "C:\Users\vlriha\Downloads\netbeans-trunk-nightly-201503060001-html\netbeans\webcommon\protractor\netbeans-configuration.js" but the CMD file is not a JS file, so NodeJS cannot run it, right? The output window contains: "C:\Program Files\nodejs\node.exe" "C:\Users\vlriha\Downloads\sample_protractor\AngularJSPhoneCat6\node_modules\.bin\protractor.cmd" "C:\Users\vlriha\Downloads\netbeans-trunk-nightly-201503060001-html\netbeans\webcommon\protractor\netbeans-configuration.js" C:\Users\vlriha\Downloads\sample_protractor\AngularJSPhoneCat6\node_modules\.bin\protractor.cmd:1 (function (exports, require, module, __filename, __dirname) { @IF EXIST "%~dp0 ^ SyntaxError: Unexpected token ILLEGAL at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3 Done. Now if I run the "protractor" only, it also does not work. "C:\Program Files\nodejs\node.exe" "C:\Users\vlriha\Downloads\sample_protractor\AngularJSPhoneCat6\node_modules\.bin\protractor" "C:\Users\vlriha\Downloads\netbeans-trunk-nightly-201503060001-html\netbeans\webcommon\protractor\netbeans-configuration.js" C:\Users\vlriha\Downloads\sample_protractor\AngularJSPhoneCat6\node_modules\.bin\protractor:2 basedir=`dirname "$0"` ^ SyntaxError: Unexpected token ILLEGAL at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3 Done. And the same happens with globally installed protractor (v. 1.8.0)
Now I see it, it must points to the bin folder not .bin... In such case, I think Protractor autodetection won't work on Windows, as "protractor.cmd" is never used and it is not in the bin folder. I'll file a separate issue.
Changeset: 00213a5fa2a7 Author: Theofanis Oikonomou <theofanis@netbeans.org> Date: 2015-03-06 14:29 Message:
(In reply to Vladimir Riha from comment #3) > Now I see it, it must points to the bin folder not .bin... In such case, I > think Protractor autodetection won't work on Windows, as "protractor.cmd" is > never used and it is not in the bin folder. I'll file a separate issue. yes I should have been more clear sorry. I do not have protractor installed globally, nor in PATH. When I opens project properties->Selenium Testing and selected Protractor the <project_path>\node_modules\protractor\bin\protractor was auto-detected for me. Anyway let's close this one and pick it up in the autodetection bug. The fix solves the issue with the stacktraces. It works for me in mac and windows. Thank you
Integrated into 'main-silver', will be available in build *201503070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/00213a5fa2a7 User: Theofanis Oikonomou <theofanis@netbeans.org> Log: Task #249660 - Protractor does not work on Windows - stacktraces not recognised