Angularjs 选择器[ng\:模型=“测试”]与任何元素都不匹配
我想使用angular运行e2e测试。 这是我的html文件:Angularjs 选择器[ng\:模型=“测试”]与任何元素都不匹配,angularjs,Angularjs,我想使用angular运行e2e测试。 这是我的html文件: <html> <div> <table class="table table-bordered"> <thread> <tr> . . . <th class="icon"> <i ng-click="test" ng-show="isQuestionEditable()" class="icon-plus"></i> </th&g
<html>
<div>
<table class="table table-bordered">
<thread>
<tr>
.
.
.
<th class="icon">
<i ng-click="test" ng-show="isQuestionEditable()" class="icon-plus"></i>
</th>
</tr>
</thread>
</div>
</html>
但是我得到了错误消息:选择器[ng\:model=“test”]与任何元素都不匹配
我正在访问正确的页面。我写道:
beforeEach(function() {
browser().navigateTo('/');
});
“/”被代理为
http://localhost:8080/test
一种解决方法是给按钮一个id=“button”
,然后您的选择器将是元素(“#button”)
另外,请检查屏幕底部的警告
从您的示例很难判断您是手动引导
angular
还是使用ng应用程序。是否为元素指定了模型?
beforeEach(function() {
browser().navigateTo('/');
});