mirror of
https://github.com/appium/appium.git
synced 2026-02-12 04:50:08 -06:00
added element conversion examples
This commit is contained in:
@@ -43,5 +43,22 @@ describe('angularjs homepage', function () {
|
||||
}).nodeify(done);
|
||||
});
|
||||
|
||||
it('should convert to wd element', function (done) {
|
||||
var el = element.all(by.repeater('todo in todos')).get(1);
|
||||
wdBrowser.wdEl(el).text().then(function (text) {
|
||||
expect(text).toEqual('build an angular app');
|
||||
}).nodeify(done);
|
||||
});
|
||||
|
||||
it('should convert from wd element', function (done) {
|
||||
return wdBrowser
|
||||
.elementById('add-some-control')
|
||||
.then(function (el) {
|
||||
return wdBrowser.swEl(el).getText().then(function (text) {
|
||||
expect(text).toEqual('Add Some Control');
|
||||
});
|
||||
}).nodeify(done);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user