交互式测试量角器 [英] Testing out Protractor interactively

查看:82
本文介绍了交互式测试量角器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试以交互方式运行量角器以测试要素

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

我通过以下方式启动硒服务器

I start the selenium server by

wedriver-manager start

然后我去量角器根目录

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

并输入以下命令

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

我遇到以下错误

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

在elementexplorer.js行是以下行

At line of elementexplorer.js is the following line

#!/usr/bin/env node

推荐答案

我也遇到了这个问题.输入量角器根目录后,尝试输入命令

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

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

确保node命令在您的PATH环境变量中,以便将其识别为有效命令.在基于Unix的系统上通常会看到#!/usr/bin/env节点,因此在这种情况下,您需要在前面放置节点",以告诉Windows使用Node.js.

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.

这篇关于交互式测试量角器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆