GithubHelp home page GithubHelp logo

calandroid-widget-extension's Introduction

Gem Version Build Status Coverage Status Code Climate Dependency Status

calandroid-widget-extension

Calabash-android widget extension provides convenient metaclasses for Calabash usage.

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

See similar extension for Calabash-ios: calios-uikit-extension

Installation

In your Gemfile:

gem 'calandroid-widget-extension'

Install gem manually:

$ gem install calandroid-widget-extension

Supported widgets

Currently small subset of widgets are supported. Supported widgets are:

Button FrameLayout ImageButton LinearLayout ListView TextView

Example use cases

Launch calabash-android console (irb)

$ calabash-android console <app.apk>

Load calandroid-widget-extension

irb> require 'calandroid-widget-extension'

Launch your application

irb> start_test_server_in_background

Execute some example Calabash and equivalent calandroid-widget-extension commands

touch('button')

Button.touch

touch('button index:1')

Button.touch(1)

touch("button marked:'buttonId'")

Button.touch('buttonId')

flash("button marked:'buttonId'")

Button.flash('buttonId')

query("button marked:'buttonId'", :text).first

Button.text('buttonId')

query('ListView', :count).first

ListView.count

query('ListView', smoothScrollToPosition: 10)

ListView.scroll_to_index(10)

query('TextView', :text).first

TextView.text

See available methods for a certain metaclass

Button.help

Did you notice alias methods?

Button.help --> Button.h

Button.query --> Button.q

Button.flash --> Button.f

Button.property --> Button.prop --> Button.p

Button.touch --> Button.tap

Okay, I think you got the point. Time to utilise calandroid-widget-extension methods in your test automation code now!

Run the tests

$ bundle

$ bundle exec rake

License

MIT

calandroid-widget-extension's People

Contributors

janijegoroff avatar

Watchers

 avatar  avatar  avatar

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.