这是我的 html 页面的样子:
<table class="service ng-scope">
<tbody>
<tr>
<th>
24 HOUR TREND
</th>
</tr>
</tbody>
</table>
我正在尝试使用量角器在我的测试中打印文本“24 小时趋势”。
这是我的测试代码:
describe("print text", function () {
var ptor;
beforeEach(function() {
// get protractor instance
ptor = protractor.getInstance();
});
it("print text", function() {
var modal;
// load the url
ptor.get("/");
var elements = ptor.findElements(protractor.By.className('service ng-scope'));
< -- Problem here --- what to do --- >
// disable jQuery animation effects
ptor.driver.executeScript("$.fx.off = true;");
});