Project

wda_client

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
minimal client for WebDriverAgent to help some operations
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 5.0
~> 10.0
~> 2.1
 Project Readme

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.