1

分度器を使用して AngularJS e2e テストケースを作成しています。私のApplciationは(jqxWidgetsから)jqxGridを使用しています。私のテストケースでは、jsで行われるjqxGridのサイズをテストする必要があります

gridSelector.jqxGrid('getrows').length

テストケースは

it('should check grid size', function() {
  var grid = browser.findElement(by.id('jqxoutbox'));
  grid.findElements( by.css('div:nth-child(2) > div')).then(function(results){
      console.log(results[0].jqxGrid('getrows').length);
  });
});  

私のテストケースでは、gridSelector id を見つけることができますが、jqxGrid 関数を実行してサイズを見つけることはできません。

StackTrace : 
Failures:

  1) e2e: main should have grid element
         Message:
                TypeError: Object [object Object] has no method 'jqxGrid'
         Stacktrace:
                TypeError: Object [object Object] has no method 'jqxGrid'

テストケースで jqxGrid 関数にアクセスする方法について何か助けを提供してください。

4

0 に答える 0