的Visual Studio 2013智能感知量角器 [英] Visual Studio 2013 protractor intellisense
问题描述
首先,我非常初学者使用的Node.js / angualar.js /protractor.js和jasmine.js的东西,我从Web开发的角落我都没有。
但现在,我只想创造一个角度应用中的一些量角器测试,这是实际工作相当精细。但我想知道是否有可能获得VS2013智能感知的工作?
我真的AP preciate如果VS建议像browser.xxx对象的功能。
我真的坚持这一说法,期待着一些提示!
THX弗洛里安
生病只是给出一个答案喽!要获取Visual Studio的2013 IntelliSense和调试角度量角器测试工作,请按照下列步骤操作:
- 安装的node.js
- 安装量角器(全球)(故宫安装-g量角器;webdriver的经理更新)
- 安装Visual Studio 2013的node.js工具
- 安装Visual Studio 2013工具打字稿
- 创建一个新的项目打字稿\\ Node.js的\\空白Node.js的控制台应用程序
- 添加您的conf.ts和spec.ts文件添加到项目
- 右键点击conf.ts,然后选择设置为Node.js的启动文件
- 在项目属性的Node.exe路径设置为您的量角器executeable文件,例如。 C:\\用户\\ MYUSER \\应用程序数据\\漫游\\故宫\\ protractor.cmd
- 下载打字稿DefinitelyTyped从Git的枢纽定义:
- 在VS2013的项目文件夹脚本\\键入创建子文件夹茉莉花,量角器和硒的webdriver
- 打字定义文件角量角器\\角protractor.d.ts,茉莉花\\ jasmine.d.ts和硒的webdriver \\硒webdriver.d.ts添加到相应的项目文件夹您在上述步骤中创建。
<醇开始=12>
尽情享受吧!
弗洛里安
First of all, I am very beginner in using node.js / angualar.js /protractor.js and jasmine.js stuff and I am not from web dev corner at all. But for now, I just want to create some protractor test for an angular app and this is actually working quite fine. But I am wondering if it's possible to get VS2013 intellisense working? I would really appreciate if VS would suggest functions of objects like 'browser.xxx'. I am really stuck with that, looking forward for some hints!
thx Florian
Ill just give an answer to myself! To get Visual Studio 2013 intellisense and debugging working for angular protractor tests, follow these steps:
- Install node.js
- Install protractor (global) („npm install -g protractor"; „webdriver-manager update")
- Install Visual Studio 2013 node.js Tools
- Install Visual Studio 2013 TypeScript Tools
- Create a new project „Typescript\Node.js\Blank Node.js Console Application"
- Add your „conf.ts" and „spec.ts" files to the project
- Right click on „conf.ts" and select „Set as node.js startup file"
- In „Project properties" set your „Node.exe path" to your protractor executeable file, eg. „C:\Users\myUser\AppData\Roaming\npm\protractor.cmd"
- Download typescript DefinitelyTyped definitions from git hub:
- In your VS2013 project folder „Scripts\Typing" create the subfolders „jasmine", „protractor" and „selenium-webdriver"
- Add the typing definition files "angular-protractor\angular-protractor.d.ts", "jasmine\jasmine.d.ts" and "selenium-webdriver\selenium-webdriver.d.ts" into the appropriate project folders you created in the step above.
- Write your protractor test and enjoy code highlighting
- Start webdriver-manger „webdriver-manager start"
- Hit „F5" to start debugging
Enjoy! Florian
这篇关于的Visual Studio 2013智能感知量角器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!