From c166e6813ebfcc9dafae31b88e69a3f5d4423ae2 Mon Sep 17 00:00:00 2001 From: Jonathan Lipps Date: Mon, 12 May 2014 14:43:14 +0100 Subject: [PATCH] add test to prove we get an array even when there's just one id --- test/functional/android/apidemos/find-element-specs.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/functional/android/apidemos/find-element-specs.js b/test/functional/android/apidemos/find-element-specs.js index 512e24dee..61c65d129 100644 --- a/test/functional/android/apidemos/find-element-specs.js +++ b/test/functional/android/apidemos/find-element-specs.js @@ -89,6 +89,14 @@ describe("apidemo - find elements -", function () { .should.eventually.have.length.at.least(10) .nodeify(done); }); + it('should find multiple elements by resource-id even when theres just one', function (done) { + driver + .elementsById('android:id/home') + .then(function (els) { + els.length.should.equal(1); + }) + .nodeify(done); + }); }); describe('find element(s) from element', function () {