WdaClient
WdaClient is my minimal client for WebDriverAgent to help some operations.
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
- Should use WebDriverAgent over the below commit hash because
/sourcesupported from it.
Usage
- Launch WebDriverAgent
- Read official document
- 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
- Launch WebDriverAgent with particular port number
- launch with
fbsimctlwith particular port number - change source code directly
- provide port number via environment of
USE_PORT
- launch with
- Generate instance of
WdaClientwithbase_url. - 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.