Giter Site home page Giter Site logo

hugs / appium-old Goto Github PK

View Code? Open in Web Editor NEW

This project forked from penguinho/appium-old

51.0 14.0 16.0 1.36 MB

"Selenium for Apps" (Test automate native or hybrid iOS apps with UIAutomation and Selenium WebDriver.)

License: Apache License 2.0

JavaScript 19.44% Python 58.83% Objective-C 21.73%

appium-old's Introduction

Appium

Appium is a test automation tool for use with native and hybrid iOS applications. It uses the webdriver JSON wire protocol to drive Apple's UIAutomation. Appium is based on Dan Cuellar's work on iOS Auto.

Appium uses the Bottle micro web-framework, and has the goal of working with all off the shelf Selenium client libraries.

There are two big benefits to testing with Appium:

1: Appium uses Apple's UIAutomation library under the hood to perform the automation, which means you do not have to recompile your app or modify in any way to be able to test automate it.

2: With Appium, you are able to write your test in your choice of programming language, using the Selenium WebDriver API and language-specific client libraries. If you only used UIAutomation, you would be required to write tests in JavaScript, and only run the tests through the Instruments application. With Appium, you can test your native iOS app with any language, and with your preferred dev tools.

Quick Start

To get started, clone the repo:
git clone git://github.com/hugs/appium

Next, change into the 'appium' directory, and install dependencies:
pip install -r requirements.txt

To avoid a security dialog that can appear when launching your iOS app, you need to modify your /etc/authorization file. You can do this by settings the element following <allow-root> under <key>system.privilege.taskport</key> to <true/> or by running the supplied python script (at your own risk)
sudo python authorize.py

To launch an interpreter for sending raw UIAutomation javascript commands run:
For the Simulator:
python appium.py "path_to_your_ios_.app"
For a Device:
python appium.py com.yourApps.BundleID -U <DEVICE_UDID>

To launch a webdriver-compatible server, run:
For the Simulator:
python server.py "path_to_your_ios_.app"
For a Device:
python server.py com.yourApps.BundleID -U <DEVICE_UDID>

Tests can be written using raw javascript or webdriver.

An example of the raw javascript approach lives in sample-code/js-test.py To run the test you must build the sample app (sample-code/apps/TestApp/TestApp.xcodeproj) in Xcode. You can find the compiled app using spotlight from the command line. mdfind -name TestApp.app Use that path to run the sample test python js-test.py "/path/to/sample.app"

An example of the webdriver approach lives in sample-code/webdriver-test.py Compile and find the app as you did in the previous example and then launch the webdriver server. python server.py "/path/to/sample.app" Now you can run a test against that server. python webdriver-test.py

Using with a Bitbeambot

  1. Connect the bitbeambot and place a connected iPad beneath it
  2. Build and install the calibration app in appium/robot/RobotCalibration/RobotCalibration/xcodeproj to the iPad
  3. Run the calibration script python appium/robot/bitbeambot-d2/calibrate.py UDID /dev/tty.robot_usb_handle
  4. Launch a webdriver server with the -b an d-c flags set
    python server.py -u UDID -b /dev/tty.robot_usb_handle -c /path/to/appium/robot/bitbeambot-d2/calibration.pickle Your.Bundle.Identifier
  5. Now Appium will send tap actions to the bitbeambot instead of through UIAutomation

Contributing

Fork the project, make a change, and send a pull request!

Mailing List

Discussion Group

appium-old's People

Contributors

cnowacek avatar hugs avatar jayakumarc avatar jdeff avatar lukeis avatar penguinho avatar pradeepbishnoi avatar rsalvador 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

Watchers

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

appium-old's Issues

Server will not start after crash where port is left open

We need to make the bottle server re-use ports when the app crashes.

This code should do the trick.
.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)

Anyone know how to apply this to a bottle server?

Currently if the app crashes I have to:
lsof -i :4723
kill -9 [all pids from lsof]

Undefined 'Error' variable in appium/appium.py

pylint flagged 'Error' as an undefined variable. I don't think 'Error' is a built-in exception class.

appium/appium.py
198 - raise Error('instruments process did not finish')

pylint error:

E:198,18:Appium.stop: Undefined variable 'Error'

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.