的Visual Studio 2013智能感知量角器 [英] Visual Studio 2013 protractor intellisense

查看:159
本文介绍了的Visual Studio 2013智能感知量角器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我非常初学者使用的Node.js / angualar.js /protractor.js和jasmine.js的东西,我从Web开发的角落我都没有。
但现在,我只想创造一个角度应用中的一些量角器测试,这是实际工作相当精细。但我想知道是否有可能获得VS2013智能感知的工作?
我真的AP preciate如果VS建议像browser.xxx对象的功能。
我真的坚持这一说法,期待着一些提示!

THX弗洛里安


解决方案

生病只是给出一个答案喽!要获取Visual Studio的2013 IntelliSense和调试角度量角器测试工作,请按照下列步骤操作:


  1. 安装的node.js

  2. 安装量角器(全球)(故宫安装-g量角器;webdriver的经理更新)

  3. 安装Visual Studio 2013的node.js工具

  4. 安装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>
  • 写您的量角器测试,并享受code凸显

  • 开始的webdriver-马槽的webdriver经理开始

  • 按F5开始调试

  • 尽情享受吧!
    弗洛里安

    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:

    1. Install node.js
    2. Install protractor (global) („npm install -g protractor"; „webdriver-manager update")
    3. Install Visual Studio 2013 node.js Tools
    4. Install Visual Studio 2013 TypeScript Tools


    1. Create a new project „Typescript\Node.js\Blank Node.js Console Application"
    2. Add your „conf.ts" and „spec.ts" files to the project
    3. Right click on „conf.ts" and select „Set as node.js startup file"
    4. In „Project properties" set your „Node.exe path" to your protractor executeable file, eg. „C:\Users\myUser\AppData\Roaming\npm\protractor.cmd"


    1. Download typescript DefinitelyTyped definitions from git hub:
    2. In your VS2013 project folder „Scripts\Typing" create the subfolders „jasmine", „protractor" and „selenium-webdriver"
    3. 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.


    1. Write your protractor test and enjoy code highlighting
    2. Start webdriver-manger „webdriver-manager start"
    3. Hit „F5" to start debugging

    Enjoy! Florian

    这篇关于的Visual Studio 2013智能感知量角器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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