Skip to content

Commit

Permalink
Make sure find returns right value on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
imurchie committed Feb 1, 2016
1 parent fd451bf commit 542b903
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/commands/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ helpers.findElOrEls = async function (strategy, selector, mult, context = '') {
try {
await this.implicitWaitForCondition(doFind);
} catch (err) {
if (err.message && err.message.match(/Condition unmet/)){
if (mult && err.message && err.message.match(/Condition unmet/)){
// only get here if we are looking for multiple elements
// condition was not met setting res to empty array
element = [];
Expand Down
1 change: 0 additions & 1 deletion lib/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class AndroidDriver extends BaseDriver {
'xpath',
'id',
'class name',
'tag name',
'accessibility id',
'-android uiautomator'
];
Expand Down
2 changes: 1 addition & 1 deletion test/functional/commands/find/find-basic-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('Find - basic', function () {
await driver.findElOrEls('id', singleResourceId, true)
.should.eventually.have.length(1);
});
describe.only('implicit wait', () => {
describe('implicit wait', () => {
let implicitWait = 5000;
before(async () => {
await driver.implicitWait(implicitWait);
Expand Down

0 comments on commit 542b903

Please sign in to comment.