Coder Social home page Coder Social logo

calios-uia-extension's Introduction

Gem Version Build Status Coverage Status Code Climate Dependency Status

calios-uia-extension

Calabash-ios UIA extension provides convenient metaclasses for UIAutomation commands usage in Calabash.

You can utilise these classes in calabash-ios console as well as in your test automation code.

Installation

In your Gemfile:

gem 'calios-uia-extension'

Install gem manually:

$ gem install calios-uia-extension

Supported UIA classes

Currently small subset of UIA classes are supported. Supported UIA classes are:

UIAAlert UIAPopover UIATarget

See UIAutomation JavaScript Reference for details: UIAutomation JavaScript Reference

Example use cases

Launch calabash-ios console (irb)

$ calabash-ios console

Load calios-uia-extension

irb> require 'calios-uia-extension'

Launch your application

irb> start_test_server_in_background

Execute some example UIA commands

UIAAlert.visible?

UIAAlert.not_visible?

UIAAlert.button_count

UIAAlert.tap('Cancel')

UIAPopover.visible?

UIAPopover.not_visible?

UIAPopover.dismiss

UIATarget.set_device_orientation(UIA_DEVICE_ORIENTATION_PORTRAIT)

UIATarget.set_device_orientation(3)

UIATarget.device_orientation

UIATarget.deactivate_application_for_duration(10)

UIATarget.send_application_to_background(10)

UIATarget.drag_from_to_for_duration(100, 100, 200, 200, 3)

UIATarget.pinch_close_from_to_for_duration(100, 100, 200, 200, 3)

UIATarget.pinch_open_from_to_for_duration(100, 100, 200, 200, 3)

UIATarget.flick_from_to(100, 100, 200, 200)

See available methods for a certain metaclass

UIAAlert.help

Did you notice alias methods?

UIATarget.deactivate_application_for_duration --> UIATarget.send_application_to_background

UIATarget.drag_from_to_for_duration(100, 100, 200, 200, 3) --> UIATarget.drag(100, 100, 200, 200, 3)

UIATarget.pinch_close_from_to_for_duration(100, 100, 200, 200, 3) --> UIATarget.pinch_close(100, 100, 200, 200, 3)

UIATarget.pinch_open_from_to_for_duration(100, 100, 200, 200, 3) --> UIATarget.pinch_open(100, 100, 200, 200, 3)

UIATarget.flick_from_to(100, 100, 200, 200) --> UIATarget.flick(100, 100, 200, 200)

Run the tests

$ bundle

$ bundle exec rake

License

MIT

calios-uia-extension's People

Contributors

janijegoroff avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

calios-uia-extension's Issues

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.