Merge pull request #2614 from sebv/master

Fixed testapp/basics tests + upgraded uiauto
This commit is contained in:
seb vincent
2014-05-20 14:45:04 +08:00
3 changed files with 10 additions and 3 deletions

View File

@@ -80,7 +80,7 @@
"bytes": "~0.2.1",
"appium-atoms": "~0.0.5",
"appium-instruments": "~0.1.21",
"appium-uiauto": "~0.0.17",
"appium-uiauto": "~0.0.18",
"mv": "~2.0.0",
"js2xmlparser2": "~0.2.0",
"xpath": "~0.0.6",

View File

@@ -10,6 +10,11 @@ var env = require('../../../helpers/env')
, path = require('path')
, _ = require("underscore");
function filterVisible(selector) {
return selector.replace(/;$/, '.withPredicate("isVisible == 1");');
// return selector.replace(/;$/, '.withValueForKey(1, "isVisible");');
}
describe('testapp - basic', function () {
describe('using calc app - 1', function () {
@@ -34,7 +39,9 @@ describe('testapp - basic', function () {
var populate = function (type, driver) {
values = [];
return driver
.elementsByClassName('UIATextField').then(function (elems) {
.elementsByIosUIAutomation(filterVisible('.textFields();'))
//.elementsByClassName('UIATextField')
.then(function (elems) {
var sequence = _(elems).map(function (elem) {
var val = Math.round(Math.random() * 10);
values.push(val);