Sha256: 2ce8869c8b2235afd535a4b09d6081214cc795786c3d03a8a4d1a298add52731

Contents?: true

Size: 1.52 KB

Versions: 11

Compression:

Stored size: 1.52 KB

Contents

# appium_capybara  [![Gem Version](https://badge.fury.io/rb/appium_capybara.svg)](http://badge.fury.io/rb/appium_capybara)


Gem enabling appium support in capybara

## Driver Setup
Set up the appium_capybara driver by running this before starting your test.

```ruby
require 'appium_capybara'

desired_caps_ios = {
  platform:        "Mac",
  deviceName:      "iPhone Simulator",
  platformName:    "iOS",
  platformVersion: "7.1",
  app:             "full/path/to/app.zip"
}

url = "http://localhost:4723/wd/hub" # or a sauce labs url

Capybara.register_driver(:appium) do |app|
    appium_lib_options = {
      server_url:           url
    }
    all_options = {
      appium_lib:  appium_lib_options,
      caps:        desired_caps_ios
    }
    Appium::Capybara::Driver.new app, all_options
end

Capybara.default_driver = :appium
```

## Capybara server
appium_capybara driver automatically starts a Rails server in `test` environment.

By default Capybara starts this web server listening to localhost only and on a random port. It is advised
to force Capybara to listen to all interface and listen to a specific port, and set this server address
in your mobile application.

```ruby
Capybara.server_host = '0.0.0.0' # Listen to all interfaces
Capybara.server_port = 56844     # Open port TCP 56844, change at your convenience
```

## Publishing to rubygems

Make sure to run `thor bump` or manually modify version.rb before publishing. RubyGems will not allow the same
version to be published twice. After the version is bumped, run `thor publish`

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
appium_capybara-1.5.0 README.md
appium_capybara-1.4.1 README.md
appium_capybara-1.4.0 README.md
appium_capybara-1.3.0 README.md
appium_capybara-1.2.1 README.md
appium_capybara-1.2.0 README.md
appium_capybara-1.1.0 README.md
appium_capybara-1.0.0 README.md
appium_capybara-0.1.2 README.md
appium_capybara-0.1.1 README.md
appium_capybara-0.1.0 README.md