Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

KazuCocoa/wda_client

Repository files navigation

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      # 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
> client.close           # close session

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.
  • 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
  • get current session id
  • close current session

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/KazuCocoa/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.

About

WdaClient is my minimal client for WebDriverAgent to help some operations

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published