无法使用量角器单击图标

时间:2018-03-14 13:20:02

标签: angularjs jasmine protractor

以下是我在网页中的元素:

@ApplicationScoped

***** Please take a look on the actual object in image file

我无法点击此图标。我试过了

<div uib-popover-template="'isVeiwCompTemplate.html'" popover-is-
open="col.colDef.value[row.entity.index]" popover-placement="right" popover-
trigger="outsideClick" class="fti-view-composition icon-fti_plusSign ng-
scope"></div>

我也尝试过使用类xpath

var ele = element(by.css("button[ng-click*=col.colDef.value]"));
    ele.click();

你能帮我找一些解决方案???

2 个答案:

答案 0 :(得分:0)

请尝试这个。我希望这应该有用

    element.all(by.repeater('((colRenderIndex, col) in 
       colContainer.renderedColumns')).then(function(renderedColumns) {
       renderedColumns[1].click();
    });

答案 1 :(得分:0)

var element = element(by.css('.icon-fti_plusSign'));
// or
var element = $('.icon-fti_plusSign');

element.click();