搜索按钮html代码。
<button type="button" class="btn form-control customSelect dropdown-toggle" dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="false">
<span class="custom-text ng-binding">Initial Status</span><span class="glyphicon glyphicon-chevron-down"></span>
</button>
其他按钮html代码
<button type="button" class="btn form-control customSelect dropdown-toggle" dropdown-toggle="" ng-disabled="disabled" aria-haspopup="true" aria-expanded="false">
<span class="custom-text ng-binding">No Filter</span><span class="glyphicon glyphicon-chevron-down"></span>
</button>
请帮帮我。
答案 0 :(得分:0)
试试这个:
var searchbtn = element.all(by.css('.btn')).get(0);
searchbtn.click();
或
var searchbtn = element.all(by.type('button')).get(0);
searchbtn.click();
这里得到(0)表示第一个按钮。