使用watir自动化将文本输入UI网格

时间:2015-12-27 11:05:22

标签: ruby angularjs automation watir-webdriver angular-ui-grid

我们最近从ng-grid更改为Ui-grid。这破坏了我的许多自动化脚本。

目前我无法在文本框中输入文字。

我的HTML:

<div 
  class="ui-grid-cell ng-scope ui-grid-coluiGrid-0005" 
  ui-grid-cell=""
  ng-class="{
    'ui-grid-row-header-cell': col.isRowHeader,
    'rowError': row.entity.isValid != undefined && !row.entity.isValid }" 
  ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" 
  tabindex="-1"
  aria-selected="true">

    <div 
      class="ui-grid-cell-contents
      ng-binding ng-scope
      ui-grid-cell-focus">
    </div>
</div>

所以我试过这个,但没有快乐:

@browser.textarea(:class,'ui-grid-cell-contents ng-binding ng-scope ui-grid-cell-focus').when_present.set 'test'

1 个答案:

答案 0 :(得分:0)

最后弄清楚了,所以以下是我想要的:

UIBarButtonItem *flipButton = [[UIBarButtonItem alloc]
                               initWithTitle:@"Pending"
                               style:UIBarButtonItemStyleBordered
                               target:self
                               action:@selector(flipView)];

self.navigationItem.leftBarButtonItem = flipButton;