Git Product home page Git Product logo

appium-ios-driver's Introduction

Appium iOS Driver

NPM version Downloads Dependency Status devDependency Status

Build Status

Appium iOS Driver is a test automation tool for iOS devices up to an including iOS 9.3. Appium iOS Driver automates native, hybrid and mobile web apps, tested on simulators and real devices, using Apples' UI Automation framework. Appium iOS Driver is part of the Appium mobile test automation tool.

To automate iOS devices with a version of iOS greater than 9.3, see appium-xcuitest-driver.

Note: Issue tracking for this repo has been disabled. Please use the main Appium issue tracker instead.

iOS Support

Appium iOS Driver supports iOS versions 8+

Installation

npm install appium-ios-driver

Authorization for automation support

On some systems Instruments is not authorized to automate iOS devices. This package comes with a little utility that pre-authorizes Instruments to run UIAutomation scripts.

Running the authorization script will bring up an alert that prompts the user to input their sudo password. There is no way around this.

Command line usage

If this package has been installed globally (either as part of an Appium installation, with npm install -g appium, or individually, with npm install -g appium-ios-driver), a global command line utility will be installed, so you simply need to invoke it:

$ authorize-ios

Programmatic usage

To invoke programmatically (in, for instance, a test runner) is as simple as importing and invoking the authorize function, which returns a Promise:

npm install -S appium-ios-driver
import { authorize } from 'appium-ios-driver';

authorize()
  .then(function () {
    console.log('iOS authorized!');
  })
  .catch(function (err) {
    console.error(`Error authorizing: ${err.message}`);
  });

Usage

Import iOS Driver, set desired capabilities and create a session:

import { IosDriver } from `appium-ios-driver`

let defaultCaps = {
  app: 'path/to/your.app',
  platformName: 'iOS',
  deviceName: 'iPhone 6'
};

let driver = new IosDriver();
await driver.createSession(defaultCaps);

Run commands:

await driver.setOrientation('LANDSCAPE');
console.log(await driver.getOrientation()); // -> 'LANDSCAPE'

Commands

Command
active
asyncScriptTimeout
back
background
checkForAlert
clear
click
clickButtonToLaunchSafari
clickCoords
clickCurrent
clickWebCoords
closeAlertBeforeTest
closeApp
closeWindow
convertElementsForAtoms
deleteCookie
deleteCookies
elementDisplayed
elementEnabled
elementSelected
execute
executeAsync
executeAtom
executeAtomAsync
executeMobile
findElOrEls
findUIElementOrElements
findUIElementsByXpath
findWebElementOrElements
flick
flickElement
forward
getAlertText
getAtomsElement
getAttribute
getContexts
getContextsAndViews
getCookies
getCssProperty
getCurrentContext
getDeviceTime
getLatestWebviewContextForTitle
getLocation
getLocationInView
getLog
getLogTypes
getName
getOrientation
getPageSource
getScreenshot
getSimFileFullPath
getSize
getText
getUrl
getWindowHandle
getWindowHandles
getWindowSize
getWindowRect
handleTap
hideKeyboard
initAutoWebview
isWebContext
keys
launchApp
listWebFrames
lock
mobileRotation
mobileScroll
mobileShake
mobileWebNav
moveTo
nativeTap
nativeWebTap
navToInitialWebview
navToViewThroughFavorites
navToViewWithTitle
onPageChange
parseElementResponse
parseExecuteResponse
parseTouch
performMultiAction
performTouch
postAcceptAlert
postDismissAlert
pullFile
pullFolder
pushFile
receiveAsyncResponse
refresh
setAlertText
setContext
setCookie
setFrame
setGeoLocation
setOrientation
setUrl
setValue
setValueImmediate
setWindow
stopRemote
submit
title
translateWebCoords
typeAndNavToUrl
useAtomsElement
useNewSafari
waitForAtom
webContextIndex
webFlickElement
xySpeedFlick

Insecure Features

These can be enabled when running this driver through Appium, via the --allow-insecure or --relaxed-security flags.

Feature Name Description
get_server_logs Allows retrieving of Appium server logs via the Webdriver log interface

Watch code for changes, re-transpile and run unit tests:

gulp watch

Test

For tests, the default sims required are an iOS 9.2 iPhone 6 and iPad 2, which you can create as follows if one doesn't already exist on your system (use xcrun simctl list to check first):

xcrun simctl create "iPhone 6" "iPhone 6" 9.2
xcrun simctl create "iPad 2" "iPad 2" 9.2

Then you can run unit and e2e tests:

// unit tests:
gulp once

// e2e tests - specify your desired iOS version, for example iOS8.4:
DEVICE=ios84 gulp e2e-test

appium-ios-driver's People

Contributors

alizelzele avatar basthomas avatar bigfei avatar christian-bromann avatar crummy avatar dependabot-preview[bot] avatar dependabot[bot] avatar dpgraham avatar greenkeeper[bot] avatar hlebhalkouski avatar imurchie avatar isbjorn avatar jlipps avatar jmoravec avatar jonahss avatar kazucocoa avatar milen-yordanov avatar moizjv avatar mrhhsg avatar mykola-mokhnach avatar rgonalo avatar sa-spag avatar scottdixon avatar sebv avatar sonia-y avatar srinivasantarget avatar toejough avatar yaphatak avatar yfangsl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appium-ios-driver's Issues

Instruments Crash .getAttribute(); strings

I have a reproducible crash. If I try to save a few Strings with .getAttribute() it causes Appium to crash. Appium Version 1.4.11

This is the debug log:

info: [debug] [INST] 2015-11-09 21:35:24 +0000 Error: Script threw an uncaught JavaScript error: JSON Parse error: Invalid number on line 2606 of bootstrap-a8326c64a8644dca.js

info: [debug] [INST] 2015-11-09 21:35:24 +0000 Stopped: Script was stopped by the user

info: [debug] [INST STDERR] 2015-11-09 16:35:24.644 instruments[5385:943499] Attempting to change event horizon while disengage

info: [debug] [INST] Instruments Trace Complete (Duration : 61.201084s; Output : /tmp/appium-instruments/instrumentscli0.trace)

info: [debug] [INSTSERVER] Instruments exited with code 0
info: [debug] Cleaning up after instruments exit
info: [debug] Instruments exited unexpectedly

info: [debug] Shutting down command proxy and ignoring any errors
info: [debug] Closing socket server.
info: [debug] Instruments socket server was closed
info: [debug] Stopping iOS log capture
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killing any other simulator daemons
info: [debug] Killall iOS Simulator
info: [debug] Cleaning sim data files
info: node-simctl: Executing: xcrun with args: simctl erase 3CB5F917-C0C4-4BAB-ABD4-48E52EF28DF2 and timeout: 2000

info: node-simctl: Executing: xcrun with args: simctl erase 3CB5F917-C0C4-4BAB-ABD4-48E52EF28DF2 and timeout: 2000

info: node-simctl: Executing: xcrun with args: simctl erase 3CB5F917-C0C4-4BAB-ABD4-48E52EF28DF2 and timeout: 2000

info: node-simctl: Executing: xcrun with args: simctl erase 3CB5F917-C0C4-4BAB-ABD4-48E52EF28DF2 and timeout: 2000

info: node-simctl: Executing: xcrun with args: simctl erase 3CB5F917-C0C4-4BAB-ABD4-48E52EF28DF2 and timeout: 2000

info: [debug] Cleaning app data files

error: Could not reset simulator. Leaving as is. Error: Command 'xcrun simctl erase 3CB5F917-C0C4-4BAB-ABD4-48E52EF28DF2' exited with code 159

info: [debug] Deleting /Users/ealiaj/Library/Developer/CoreSimulator/Devices/3CB5F917-C0C4-4BAB-ABD4-48E52EF28DF2/data/Containers/Data/Application/EAE616C3-1687-434A-BEA0-8D3A00EF4FC1
info: [debug] Deleting /Users/ealiaj/Library/Developer/CoreSimulator/Devices/3CB5F917-C0C4-4BAB-ABD4-48E52EF28DF2/data/Containers/Bundle/Application/7BD142A0-83A3-454F-BFD7-D1740253F5B5

error: Error getting source, can't continue finding element by XPath

info: [debug] Deleting /Users/ealiaj/Library/Developer/CoreSimulator/Devices/3CB5F917-C0C4-4BAB-ABD4-48E52EF28DF2/data/Library/Preferences/com.wheelsup.wheelsup.plist
info: [debug] We were in the middle of processing a command when instruments died; responding with a generic error
info: [debug] Cleaning up appium session
info: [debug] Condition unmet after 12306ms. Timing out.
info: [debug] Responding to client with error: {"status":13,"value":{"message":"Instruments died while responding to command, please check appium logs","name":"UnknownError","origValue":"Instruments died while responding to command, please check appium logs"},"sessionId":null}
info: <-- POST /wd/hub/session/d58d581c-8ac7-4464-9826-fb281cf72a17/element 500 12308.256 ms - 230 

info: --> GET /wd/hub/status {}

This is the code I use.

String Text2 = requestAccountPage.TextBody2().getAttribute("value");

This is one of the Strings below.

"Please try again to make sure that your email addressed was typed correctly.                                                         

If you continue to have trouble, contact Member Services at the phone number or email address below."

1.5 Cleanup

  • Make sure all deps are up to date (and there are no unused deps)
  • Take a look at all TODOs to see if we need to resolve any for the release
  • Set up code coverage
  • Set up CI (unit tests, functional tests, code coverage; should be on all relevant platforms, and should include multi-executor parallelism for long-running testsuites)
  • Ensure that we are using appium-support functions, not home-grown helpers
  • Ensure that we have high unit test code coverage percentage
  • Ensure that we have sufficient/appropriate functional test coverage
  • Write a decent README, explaining (a) what the purpose of the module is, (b) how it relates to other appium modules, and (c) how to use its interface
  • Ensure that code conforms to our style
  • Ensure we are not using any sync functions
  • Ensure that code is well-commented
  • Ensure that non-production code or assets are added to .npmignore to reduce npm install size

Swipe works incorrect. WaitAction is not perform

Fast swipe, different behavior with Android.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.5.2
  • Last Appium version that did not exhibit the issue (if applicable): 1.4.16
  • Desktop OS/version used to run Appium: Mac OS
  • Node.js version (unless using Appium.app|exe): v5.7.0
  • Mobile platform/version under test: iOS
  • Real device or emulator/simulator: real
  • Appium CLI or Appium.app|exe: CLI

Link to Appium logs

On [email protected] call method IOSDriver.swipe(200, 200, 0, 100, 3)

Full Reset capability is not working in Appium 1.8.1 in real device

I am trying to uninstall the app after the test execution completed using fullReset as true

capabilities.setCapability(MobileCapabilityType.FULL_RESET, true);
capabilities.setCapability(MobileCapabilityType.VERSION, deviceConfig.getPlatformVersion());
        capabilities.setCapability(DeviceConfig.KEY_DEVICE_NAME, deviceConfig.getDeviceName());
        capabilities.setCapability(DeviceConfig.KEY_PLATFORM_NAME, deviceConfig.getPlatformName());
        capabilities.setCapability(MobileCapabilityType.APP, getAppPathFromServer(appName));
        capabilities.setCapability(DeviceConfig.KEY_CLEAR_SYSTEM_FILES, true);
        capabilities.setCapability(MobileCapabilityType.UDID, deviceConfig.getDeviceUdid());
        capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);

But it is not uninstalling the app after the test executed

Appium version 1.8.1
Device : iPhoneX
OS version 11.4.1

Appium log is here

Note: It is working fine in Android

Sometimes Appium can't start browser: "Cannot read property 'ELEMENT' of undefined"

2016-09-09 20:45:24:682 - [MJSONWP] Encountered internal error running command: TypeError: Cannot read property 'ELEMENT' of undefined

This happens many times and randomly. All I'm doing is starting a new Appium session from scratch (new IOSDriver<>(capabilities)) with the following capabilities:

Capabilities:

  • showIOSLog: true
  • noReset: false
  • sendKeyStrategy: 'grouped'
  • newCommandTimeout: 1000000
  • platformVersion: '9.3'
  • safariAllowPopups: true
  • automationName: 'WebDriverAgent'
  • browserName: 'safari'
  • platformName: 'iOS'
  • deviceName: 'iPad Air'

Environment:

  • OSX El Capitan 10.11.6
  • Node 6.5.0
  • Appium 1.5.3
  • Appium Java client 3.4.1
  • XCode 7

Full stack trace
Appium logs

Error converting element ID when element returned inside of a JSON object

When I return a web element as the result of a JavaScript script then I am able to use it fine (e.g. invoke click, getTagName, etc.). However, if I return some web element(s) inside of a result object then trying to use one results in "Error converting element ID for using in WD atoms".

The below example works for Chrome, Firefox, Android, etc. but not for iPhone via Appium:

package com.example;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;

@SuppressWarnings("unchecked")
public class FindElementByJavaScriptDemo {
    public static void main(String... args) throws MalformedURLException {
        WebDriver webDriver = createWebDriver();
        try {
            webDriver.get("https://www.google.com/");
            JavascriptExecutor javascriptExecutor = (JavascriptExecutor) webDriver;
            Object result = javascriptExecutor.executeScript("return {" +
                    "    element: document.getElementById('lst-ib') " +
                    "}");
            Map<String, ?> object = (Map<String, ?>) result;
            WebElement webElement = (WebElement) object.get("element");
            System.out.println(webElement.getTagName());
        } finally {
            webDriver.quit();
        }
    }

    private static RemoteWebDriver createWebDriver() throws MalformedURLException {
        return new RemoteWebDriver(createRemoteAddress(), createDesiredCapabilities());
    }

    private static URL createRemoteAddress() throws MalformedURLException {
        String username = System.getenv("SAUCE_USERNAME");
        String accessKey = System.getenv("SAUCE_ACCESS_KEY");
        String host = "ondemand.saucelabs.com:80";
        return new URL("http://" + username + ":" + accessKey + "@" + host + "/wd/hub");
    }

    private static Capabilities createDesiredCapabilities() {
        DesiredCapabilities desiredCapabilities = DesiredCapabilities.iphone();
        desiredCapabilities.setCapability("appiumVersion", "1.5.3");
        desiredCapabilities.setCapability("deviceName", "iPhone Simulator");
        desiredCapabilities.setCapability("deviceOrientation", "portrait");
        desiredCapabilities.setCapability("platformVersion", "9.3");
        desiredCapabilities.setCapability("platformName", "iOS");
        desiredCapabilities.setCapability("browserName", "Safari");
        return desiredCapabilities;
    }
}
Exception in thread "main" org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error converting element ID for using in WD atoms: :wdc:1472078050978 (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 110 milliseconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'NTISP138', ip: '192.168.56.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{orientation=PORTRAIT, networkConnectionEnabled=false, noReset=true, webdriver.remote.quietExceptions=true, hasMetadata=true, keepKeyChains=true, databaseEnabled=false, deviceName=iPhone Simulator, launchTimeout=180000, platform=MAC, backendRetries=4, showIOSLog=true, desired={showIOSLog=true, orientation=PORTRAIT, noReset=true, newCommandTimeout=0, platformVersion=9.3, webdriver.remote.quietExceptions=true, browserName=safari, keepKeyChains=true, platformName=iOS, deviceName=iPhone Simulator, launchTimeout=180000, backendRetries=4}, webdriver.remote.sessionid=10bf17df6e8149d88b1d5fbabbbf9da9, newCommandTimeout=0, platformVersion=9.3, locationContextEnabled=false, webStorageEnabled=false, takesScreenshot=true, browserName=safari, javascriptEnabled=true, platformName=iOS}]
Session ID: 10bf17df6e8149d88b1d5fbabbbf9da9
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
    at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327)
    at org.openqa.selenium.remote.RemoteWebElement.getTagName(RemoteWebElement.java:144)
    at com.example.FindElementByJavaScriptDemo.main(FindElementByJavaScriptDemo.java:24)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Downloading an ipa from a url fails to install on a real device

When downloading an ipa from a url, the install fails when using a real device with the following error:
[INST STDERR] Instruments Usage Error: Specified target process is invalid: [redacted]

This is caused by the fix at https://github.com/appium/appium-ios-driver/blob/master/lib/driver.js#L209. This helped .ipa files to be installed correctly, but the BaseDriver unzips the .ipa and opts.app is now pointing at an .app file instead. This causes a mismatch of file paths between opts.ipa and opts.app and the ipa url is attempted to be installed (which doesn't fail).

[debug] [iOS] App is an ipa
[BaseDriver] Using downloadable app 'http://[redacted]/real_device_tests.ipa'
[debug] [BaseDriver] http://[redacted]/real_device_tests.ipa downloaded to /var/folders/n_/d_bw41_d1fjd_nn22sdw_4d80000gn/T/201642-5150-148yoxr.65h9cc8fr/appium-app.zip
[BaseDriver] Downloaded app to '/var/folders/n_/d_bw41_d1fjd_nn22sdw_4d80000gn/T/201642-5150-148yoxr.65h9cc8fr/appium-app.zip'
[debug] [BaseDriver] Unzipping /var/folders/n_/d_bw41_d1fjd_nn22sdw_4d80000gn/T/201642-5150-148yoxr.65h9cc8fr/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/n_/d_bw41_d1fjd_nn22sdw_4d80000gn/T/201642-5150-148yoxr.65h9cc8fr/appium-app.zip
[BaseDriver] Unzipped local app to '/var/folders/n_/d_bw41_d1fjd_nn22sdw_4d80000gn/T/201642-5150-148yoxr.65h9cc8fr/Payload/[redacted].app'
[debug] [iOS] Removing any remaining instruments sockets
...
...
...
[debug] [iOS] App is not installed. Will try to install the app.
[debug] [iOS] app: /var/folders/n_/d_bw41_d1fjd_nn22sdw_4d80000gn/T/201642-5150-148yoxr.65h9cc8fr/Payload/[redacted].app
[debug] [iOS] ipa: http://[redacted]/real_device_tests.ipa
[debug] [iOS] Installing ipa found at http://[redacted]/real_device_tests.ipa
[debug] [iOS] Nothing found on device, going ahead and installing.

Note: [debug] [iOS] App is an ipa, app: [path], and ipa: [path] were logs added by me for testing

What property should I set in stead of "fullReset" when I'd like to set "fullRest"?

Does "Cannot set preferences because a full-reset was requested" mean we should set full-reset as capability instead of fullReset ?
When I try to run Appium1.6.0 beta2 x iOS9.3(simulator) x xcuitest-driver with "fullRest" capability, then the following error caused and relaunch simulator many times(and stop running tests)

Error: Cannot set preferences because a full-reset was requested

( my full log is here: https://gist.github.com/KazuCocoa/e525f3fe7baf26bb7ed33dfbb1a8e437 )

According to the following line, I guess I should set full-reset instead of "fullReset". but when I set fill-reset as capability, the test app doesn't uninstall and re-install correctly.

async function setPreferences (sim, opts, safari = false) {
  let needToSetPrefs = checkPreferences(SETTINGS_CAPS, opts);
  let needToSetSafariPrefs = checkPreferences(SAFARI_SETTINGS_CAPS, opts);
  if (!needToSetPrefs && !needToSetSafariPrefs) {
    logger.debug("No iOS / app preferences to set");
    return;
  } else if (opts.fullReset) {
    let msg = "Cannot set preferences because a full-reset was requested";
    logger.errorAndThrow(msg);
  }

  logger.debug("Setting iOS and app preferences");

  if (await sim.isFresh()) {
    await launchAndQuitSimulator(sim, safari);
  }

Monitor onShutdown

monitor this.instruments.onShutdown, make it call startUnexpectedShutdown so that the session gets cleaned.

release 1.13.0 missing

version 1.13.0 is mentioned in the npm-shrinkwrap.json for appium 1.6.2, but no such release exists in this repo.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Privileges problem during Appium installation

After successful Appium installation on Mac with a use of npm:
sudo npm install -g appium
followed by installation of "authorize-ios"
sudo npm install -g authorize-ios
I tried to run the later. Unfortunately, this ended up with a following exception

"Encountered an issue changing priveledges...
and "Error was: Command 'chown -R myusername"

After some investigation on my site, I noticed that the username printed in the error message does not correspond to the username I have after checking it in the terminal with the following line:
id-un

In order to solve my issue, I change the "Account Name" in my user settings to the same one as displayed in the error. However, I believe it should not be a long term solution due to the fact that not everyone is willing and allowed to change their personal settings. Could you, please, take a look at this and maybe use the id-un users credentials instead during the ios authorization process?

PS. Love your work. Appium is really a great and powerful tool!

Execute is not implemented according Webdriver protocol in native context

In 14.2.1 Execute Script it states that:

Let result be the result of calling execute a function body, with arguments body and arguments.

This is not working as expected in a native context. Given the following command:

[MJSONWP] Calling AppiumDriver.execute() with args: ["return (function (a) {\n ...
[debug] [iOS] Executing iOS command 'execute'
[debug] [UIAuto] Sending command to instruments: return (function (a) {
                                return a + 2;
                            }).apply(null, arguments)

It fails with:

{"status":17,"value":"Return statements are only valid inside functions."}

I think this should be handled in the iOS driver because the state of the context is known so that the command payload can be handled properly.

Here is another comparison between the difference between native and webview context (WebdriverIO log excerpt):

// native context
[15:23:35]  COMMAND     POST     "/wd/hub/session/2c54d96e-0fe3-4f1b-92f0-87bd738cb38d/execute"
[15:23:35]  DATA                {"script":"3 + 2","args":[]}
[15:23:36]  RESULT              5

// webview context
[15:23:37]  COMMAND     POST     "/wd/hub/session/2c54d96e-0fe3-4f1b-92f0-87bd738cb38d/execute"
[15:23:37]  DATA                {"script":"return 3 + 2","args":[]}
[15:23:37]  RESULT              5

problem finding children of an element by xpath in IOS

There is a bug in commands.findUIElementsByXpath (find.js:166). When trying to find children of an element by xpath, au.getElement(context).getTreeForXML() returns indexPath relative to the parent (not full index path), so the next command that wants to get elements by their indexPath au.getElementsByIndexPaths(["/0/3"]) will fail or will find the wrong element (because of wrong indexPath).

The problem here is the only info about the parent we have is the id of parent element. is there any way to get indexPath of an element by id? this way we can calculate the full indexPath and make the method work correctly.

Deprecate iOS 7.x

With iOS 9 release, deprecate iOS 7.x (for stats on usage, see here).

  • add deprecation warning when starting a new session
  • add documentation to README

Investigate Scroll

Calling .click() on an element that's out of view results in element could not be tapped.

Manually scrolling to the element and then calling .click() works fine.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Needs to clean up the temporary files of app

When start a test with one .ipa file, Appium will copy the .ipa file into one temporary directory, and unzip it.

But after the test finished, the temporary files are not removed.

Looks like there is a command timeout bug

To investigate later, this happens during the testapps/keyboard and testapps/gesture tests.

warn: [BaseDriver] Shutting down because we waited 60 seconds for a command
error: [Appium] Had trouble ending session undefined: Cannot read property 'deleteSession' of undefined
info: [Appium] Removing session undefined from our master session list

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.