Skip to content

Commit

Permalink
update uiauto to take advantage of new hideKeyboard strategy (fix #1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlipps committed Apr 4, 2014
1 parent fb9dbe4 commit a88eac5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/devices/ios/ios-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ iOSController.setLocation = function (latitude, longitude, altitude, horizontalA

iOSController.hideKeyboard = function (keyName, cb) {
if (typeof keyName !== "string") {
keyName = "Hide keyboard";
keyName = "";
}
this.proxy("au.hideKeyboard('" + keyName + "')", cb);
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"bytes": "~0.2.1",
"appium-atoms": "~0.0.5",
"appium-instruments": "~0.1.20",
"appium-uiauto": "~0.0.15",
"appium-uiauto": "~0.0.16",
"mv": "~2.0.0",
"js2xmlparser2": "~0.2.0",
"xpath": "~0.0.6",
Expand Down
2 changes: 1 addition & 1 deletion submodules/appium-uiauto
15 changes: 15 additions & 0 deletions test/functional/ios/testapp/clear-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ describe('testapp - clear -', function () {
});

it('should hide keyboard', function (done) {
driver
.elementByTagName('textField').sendKeys("1")
.then(function () {
if (!env.IOS7) {
return driver
.elementByTagName('slider').click()
.should.be.rejected;
}
})
.execute("mobile: hideKeyboard")
.elementByTagName('slider').click()
.nodeify(done);
});

it('should hide keyboard using keyName', function (done) {
driver
.elementByTagName('textField').sendKeys("1")
.then(function () {
Expand Down

0 comments on commit a88eac5

Please sign in to comment.