lundi 2 mars 2015

Click on column in table - Protractor

I have pretty big compelx TABLE in HTML, and I need click first row:



<div class="ui-grid-canvas"> //this is whole table
<div ng-repeat="(rowRenderIndex, row) in rowContainer.renderedRows track by $index" class="ui-grid-row ng-scope" ng-style="containerCtrl.rowStyle(rowRenderIndex)" ng-class="{'ui-grid-row-selected': row.isSelected}" style="margin-top: 0px;"> //this is one line
<div ui-grid-row="row" row-render-index="rowRenderIndex" class="ng-isolate-scope"> //this is blanked part (740x0px)
<div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell ng-scope ui-grid-col0 ui-grid-row-header-cell" ng-class="{ 'ui-grid-row-header-cell': col.isRowHeader }" ui-grid-cell="">
<div class="ui-grid-disable-selection ng-scope"> //stil first column
<div class="ui-grid-cell-contents"> //stil first column
<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok ng-scope" ng-class="{'ui-grid-row-selected': row.isSelected}" ng-click="selectButtonClick(row, $event)">&nbsp;</div> //clickable part of first element.


As it looks like this I need to click on row number 20, 21,22 is here somebody who can help me with that?


I try with something like:



element(by.css('.ui-grid-canvas').row(22)).element(by.css('[ng-click="selectButtonClick(row, $event)"]')).click();


but i get error:



r(".ui-grid-canvas") has no method 'row'


Please is here somebody who can help me with this?


Aucun commentaire:

Enregistrer un commentaire