Skip to content

Commit

Permalink
add test for UiAutomator from context
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonahss committed Jun 24, 2014
1 parent af2d6a4 commit 2ba98ce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/functional/android/apidemos/find/by-uiautomator-specs.js
Expand Up @@ -14,6 +14,16 @@ describe("apidemo - find elements - by uiautomator", function () {
els.length.should.be.above(11);
}).nodeify(done);
});
it('should find elements within the context of another element', function (done) {
driver
.elementByClassName('android.widget.LinearLayout').then(function (el) {
el.elementsByAndroidUIAutomator('new UiSelector().className("android.widget.TextView")')
.then(function (els) {
els.length.should.be.above(0);
els.length.should.be.below(3);
}).nodeify(done);
});
});
it('should find elements without prepending "new UiSelector()"', function (done) {
driver.elementsByAndroidUIAutomator('.clickable(true)').then(function (els) {
els.length.should.be.above(11);
Expand Down

0 comments on commit 2ba98ce

Please sign in to comment.