wda_lib 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95ca5c7a24cbfa4cacb1195868207f2d02f78b14
4
- data.tar.gz: e9ba4b825df9031188b80141d8c17cb9df597886
3
+ metadata.gz: 96669d22fb7d6d40b173f8e7c76095bada487c73
4
+ data.tar.gz: b640ca7a9881a66925011548b5954fbb2453af00
5
5
  SHA512:
6
- metadata.gz: 9f3d79ba4de77d34bf9b2ece6ae678652bf8c29805266e4a508f09c25305da2770dfd61314f372817b509d8a50337def5c3f94bafa293f0d5238252d3655e2a6
7
- data.tar.gz: 8316d75df26d475f5952d1c7a3f4b120bf48829fe801a80a6e37ddbea11d3329f3575acfb226332f64ba4721fe707c1a220937d3d16b8a3f631b9f0ea656346d
6
+ metadata.gz: b9a06e066dff08665084c0b063fcf9ae1c7ee48f25614b3e1e1a154d40f611b4923819c197c68fa48d509d13565353c7738678d0bfff23ad62dfcda18d17f2df
7
+ data.tar.gz: f794756fa93caa0657c0c0af2349999ca19ad2382771a96dadb752696cb8823eaf0c9c96ccec024dc4375af658e44b7d0b21eee52eab81ca41b71b8eb8264f5b
@@ -29,5 +29,16 @@ class WDA
29
29
  def timeout_in_session(duraiton)
30
30
  post '/timeout', { type: 'xctevent', ms: duration }
31
31
  end
32
+
33
+ def double_tap_homebutton
34
+ post(@base_url + '/doubleTapHomescreen')
35
+ end
36
+
37
+ def kill_app(app_name)
38
+ double_tap_homebutton
39
+ app_rect = xpath_search('Other', 'label', app_name).first.rect
40
+ swipe(app_rect['x'] + 10, app_rect['x'] + 10, @win_y*4/5, @win_y/3)
41
+ homescreen
42
+ end
32
43
  end
33
44
  end
@@ -30,7 +30,7 @@ class WDA
30
30
  # @param id [String] Element uuid
31
31
  # @return wdRect
32
32
  def rect
33
- client.get '/element/' + eid + '/rect'
33
+ client.get('/element/' + eid + '/rect')['value']
34
34
  end
35
35
 
36
36
  # Get attribute value
@@ -48,7 +48,6 @@ class WDA
48
48
  # This is not realy needed since we can find and click app icon to start app
49
49
  # @return [self]
50
50
  def launch_app(app_name_or_id)
51
- p "Launching app: #{app_name_or_id}"
52
51
  fail 'Either app name or bundle id should be given for launch app' if app_name_or_id.nil?
53
52
  if app_name_or_id.include?('.') # Given value is app's bundle id
54
53
  @bundle_id = app_name_or_id
@@ -1,3 +1,3 @@
1
1
  class WDA
2
- VERSION = '0.0.14'
2
+ VERSION = '0.0.15'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wda_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - MIN Yi