小编Aco*_*sta的帖子

量角器 - 如何将promises数组的结果转换为另一个数组

我从这段代码得到了一系列的promise:,element.all(by.repeater('unit in units'))我发现很难将数据放到另一个数组中:

element.all(by.repeater('unit in units')).then(function (arr) {
    var items = [];

    for (var i = 0; i < arr.length; i++) {
      arr[i].getText().then(function(text) {
        items.push(text);
      });
    }

   //PROBLEM ITEMS is Empty
   console.log(items);
});
Run Code Online (Sandbox Code Playgroud)

javascript arrays angularjs protractor

17
推荐指数
2
解决办法
3万
查看次数

如何知道使用凉亭的新包装版本?

我正在使用bower查看下面我的bower.json中的依赖项,所以问题是我希望bower用新版本发布一个依赖关系的报告,但是没有安装它,因为使用npm-check-updates for nat的一个很好的列表过时的依赖项.

...
 "dependencies": {
        "angular": "1.3.0-beta.17",
        "angular-animate": "1.3.0-beta.17",
        "angular-mocks": "1.3.0-beta.17",
        "angular-resource": "1.3.0-beta.17",
        "angular-route": "1.3.0-beta.17",
        "angular-ui-select2": "~0.0.5",
        "underscore": "~1.x",
        "bootstrap": "~3.x",
        "components-font-awesome": "~4.x",
        "angular-bootstrap": "~0.11.0",
        "ng-grid": "~2.0.11",
        "AngularJS-Toaster": "~0.4.6",
        "intro.js": "~0.9.0",
        "angular-intro.js": "~1.1.1"
    },
...
Run Code Online (Sandbox Code Playgroud)

bower

8
推荐指数
1
解决办法
2420
查看次数

量角器测试不是在Firefox上开始的

我有一套在chrome上运行正常的测试但是当我将chromeName的功能从chrome更改为firefox时甚至没有得到错误信息

//Before
   capabilities: {
         'browserName': 'chrome',
         'chromeOptions': { args: ['--test-type', 'show-fps-counter=true'] }
    },

//After
   capabilities: {
          'browserName': 'firefox'
    },
Run Code Online (Sandbox Code Playgroud)

protractor

5
推荐指数
1
解决办法
4366
查看次数

MVVMLight EventToCommand导致内存泄漏

您好

我得到了这个xaml,我的EventToCommand连接到MVVM,这个代码的问题是导航离开它的页面总是留在内存中.

<ComboBox Grid.Column="1" Grid.Row="0" FontSize="10" 
                  SelectedIndex="{Binding Foo, Mode=TwoWay}" TabIndex="0">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="SelectionChanged">
                    <cmd:EventToCommand Command="{Binding FooChangeCommand}"
                                        PassEventArgsToCommand="True" />
                </i:EventTrigger>
            </i:Interaction.Triggers>
            <ComboBoxItem Content="Show Al" />               
            <ComboBoxItem Content="..." /> 
        </ComboBox>
Run Code Online (Sandbox Code Playgroud)

c# memory-leaks silverlight-4.0 mvvm-light

2
推荐指数
1
解决办法
1268
查看次数