WdaClient

WdaClient is my minimal client for WebDriverAgent to help some operations.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'wda_client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install wda_client

Requirement

Usage

  1. Launch WebDriverAgent
  2. load this module and create instance $ pry > require 'wda_client' > client = WdaClient.new desired_capabilities: "{\"desiredCapabilities\":{\"bundleId\": \"com.my.app\"}}" > client.get_status # get https://github.com/facebook/WebDriverAgent/wiki/Queries#checking-service-status > client.take_screenshot # https://github.com/facebook/WebDriverAgent/wiki/Queries#get-a-screenshot > client.get_source # https://github.com/facebook/WebDriverAgent/wiki/Queries#source-aka-tree

Advanced

  1. Launch WebDriverAgent with particular port number
    1. launch with fbsimctl with particular port number
    2. change source code directly
    3. provide port number via environment of USE_PORT
  2. Generate instance of WdaClient with base_url.
  3. Set port 4100, for insrance.
client = WdaClient.new desired_capabilities: "{\"desiredCapabilities\":{\"bundleId\": \"com.my.app\"}}", base_url: 'http://localhost:4100'

Current Status

  • Get Status / Get source / go to homescreen / Take Screenshot / install app and get session id

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/wda_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.