无法在下拉测试中聚焦元素
cannnot focus element in dropdown test
这是我在 angular
中的下拉菜单
<div class="form-group">
<label>Select Entity:</label>
<select class="form-control" id="sel1">
<option value="Select">Select</option>
<option value="Test">Test</option>
</select>
</div>
量角器测试用例是这样的:
var entity = element(by.id('sel1')).click();
var option = element(by.tagName('option[value="Test"]')).click();
我在量角器中遇到错误:
Failed: unknown error: cannot focus element
var entity = element(by.id('sel1')).click();
var option = element(by.cssContainingText('option', 'Test')).click();
这是我在 angular
中的下拉菜单<div class="form-group">
<label>Select Entity:</label>
<select class="form-control" id="sel1">
<option value="Select">Select</option>
<option value="Test">Test</option>
</select>
</div>
量角器测试用例是这样的:
var entity = element(by.id('sel1')).click();
var option = element(by.tagName('option[value="Test"]')).click();
我在量角器中遇到错误:
Failed: unknown error: cannot focus element
var entity = element(by.id('sel1')).click();
var option = element(by.cssContainingText('option', 'Test')).click();