Testing out Protractor interactively

我怕爱的太早我们不能终老 提交于 2020-01-03 04:24:45

问题


I am trying to run the protractor interactively to test out the elments

I start the selenium server by

wedriver-manager start

Then I go to protractor root directory

C:\Users\Name\AppData\Roaming\npm\node_modules\protractor

and type the following command

"./bin/elementexplorer.js" http://some_server/someApp

I get following errors

Script
Line : 1
Char : 1
Error : Invalid Character
Code : 800A03F6
Source : MS JScript compliation error

At line of elementexplorer.js is the following line

#!/usr/bin/env node

回答1:


I had this problem too. After you enter your protractor root directory, try entering the command

node bin\elementexplorer.js http://some_server/someApp

Make sure the node command is in your PATH environment variable so that it's recognized as a valid command. #!/usr/bin/env node is generally something you see on Unix-based systems, so in this case you need to put "node" in front to tell Windows to use Node.js.




回答2:


try leaving the quotes of the path



来源:https://stackoverflow.com/questions/21387303/testing-out-protractor-interactively

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!