我想做一个 element.all
这样
element.all(by.className('col-md-4 ng-scope')).all(by.className('chart-small-titles dashboard-alignment ng-binding')).then(function(items) {
console.log(items[1].getText());
});
这段代码返回这个。
ElementFinder {
browser_:
ProtractorBrowser {
controlFlow: [Function],
schedule: [Function],
setFileDetector: [Function],
getExecutor: [Function],
getSession: [Function],
还有更多这样的代码
我做错了什么?也许我用错了.all函数,我不知道。
可能有不同的事情出错。试试这个
element.all(by.className('col-md-4 ng-scope')).all(by.className('chart-small-titles dashboard-alignment ng-binding')).then(function(items) {
items.get(1).getText().then(
function (text) {
console.log(text);
})
)
});