wda_lib 0.0.9 → 0.0.11

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: f53d350f63eecdc841f7a4047d3c4b3cdf065e8c
4
- data.tar.gz: 0e77a46669330056eaa388371669b8003feac410
3
+ metadata.gz: 8ba7a44e70f2924d9b630eb1ca715ae792e5f663
4
+ data.tar.gz: df7b8eb9560b8027d11e290e0b0d9e7fba0e1890
5
5
  SHA512:
6
- metadata.gz: f2881fdb5c82561b62ddd31c553be7715140227e72c0745d70177b7b368f01f85fc34aab3868b3c80d6b89d85ed29c198604fc01f64e56db49e3e93c11b99938
7
- data.tar.gz: bc2410e5125853e205e09046f635541a609a2b8d1c336317240b7a14ba7e3e45a3f8aaed8b5394d4d9bbd3434729f21664c94c80280c02d3267d11e07d97fec2
6
+ metadata.gz: b3725bf02993100bc8f5fc89db2386faa65d9690474903f9c7b2f096d551a945aa38747a391616fb8519f5940c61961c37fe95e2362296e519ccb76336fa0bbb
7
+ data.tar.gz: 2c8a16bd2a210972e0176fbe48e5e6f943db7e2ec3b0d0aaf0722983e6c6474d39d12f8a2bf2e70f02566ead3c7bbec856165d46d0cff5fcc8d1b44daa11813f
data/README.md CHANGED
@@ -20,6 +20,7 @@ A simple test to show all actions on WDA IntegrationApp
20
20
 
21
21
  ## Options
22
22
 
23
+ #####Update: I have to disable selenium-webdriver gem since wda_lib was using selenium-webdriver 3.0 beta which has conflict with Appium's one(2.x), I did try to downgrade for wda_lib, but doesn't work currently, need more time to give a try to find a way to handle it.
23
24
  This lib is also providing access of selenium-webdriver method find_element and find_elements.
24
25
  You can do:
25
26
 
data/lib/wda_lib/debug.rb CHANGED
@@ -33,7 +33,7 @@ class WDA
33
33
  app_found = false
34
34
  app = nil
35
35
  homescreen
36
- while !app_found do
36
+ while !app_found && max < 10 do
37
37
  swipe(@win_x*4/5, 10, @win_y/2, @win_y/2)
38
38
  max += 1
39
39
  texts(app_name).each do |e|
@@ -9,9 +9,9 @@ class WDA
9
9
  #
10
10
  # @param path [String] the full path to save the png
11
11
  # @return screenshot result [Hash]
12
- def screenshot(path)
12
+ def screenshot(path, scale = 100)
13
13
  path.include?('.png')? path : path += '.png'
14
- p response = get(@base_url + '/screenshot')
14
+ p response = get(@base_url + '/screenshot?scale=' + scale)
15
15
  begin
16
16
  File.open(path, 'wb') {|f| f.write Base64.decode64(response['value']) }
17
17
  rescue IOError => e
@@ -4,7 +4,7 @@ class WDA
4
4
  # Get current status
5
5
  # @return [Obj]
6
6
  def status
7
- @status = get(@base_url + '/status')
7
+ p @status = get(@base_url + '/status')
8
8
  @platform_name = @status['value']['os']['name']
9
9
  @platform_version = @status['value']['os']['version']
10
10
  update_status(@status)
@@ -43,7 +43,9 @@ class WDA
43
43
  @session_id = nil # Prepare to create new session
44
44
  @session_valid = false # Prepare to create new session
45
45
  capabilities
46
- @driver = Selenium::WebDriver::Driver.for(:remote, :url => @base_url, :desired_capabilities => @caps[:desiredCapabilities])
46
+
47
+ ## Temporarily disabled
48
+ # @driver = Selenium::WebDriver::Driver.for(:remote, :url => @base_url, :desired_capabilities => @caps[:desiredCapabilities])
47
49
  status
48
50
  else
49
51
  app_name = app_name_or_id
@@ -1,3 +1,3 @@
1
1
  class WDA
2
- VERSION = '0.0.9'
2
+ VERSION = '0.0.11'
3
3
  end
data/lib/wda_lib.rb CHANGED
@@ -51,11 +51,12 @@ class WDA
51
51
  @url = @base_url
52
52
  @server_host = parsed_url.host
53
53
  @server_port = parsed_url.port
54
- healthcheck
55
54
  status
56
55
  window_size
57
56
  capabilities(opts)
58
- @driver = Selenium::WebDriver::Driver.for(:remote, :url => @base_url, :desired_capabilities => @caps[:desiredCapabilities])
57
+
58
+ ## Temporarily disabled
59
+ # @driver = Selenium::WebDriver::Driver.for(:remote, :url => @base_url, :desired_capabilities => @caps[:desiredCapabilities])
59
60
  end
60
61
 
61
62
  # Build desired_capabilities with options
data/wda_lib.gemspec CHANGED
@@ -23,5 +23,5 @@ Gem::Specification.new do |s|
23
23
  s.add_development_dependency "rspec", "~> 3.5"
24
24
  s.add_dependency "bundler", "~> 1.12"
25
25
  s.add_dependency "httparty", "~> 0.14"
26
- s.add_dependency "selenium-webdriver", "~> 3.0.0.beta3.1"
26
+ s.add_dependency "selenium-webdriver", "~> 2.50"
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wda_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - MIN Yi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-09 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 3.0.0.beta3.1
75
+ version: '2.50'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 3.0.0.beta3.1
82
+ version: '2.50'
83
83
  description: A simple ruby lib of binding methods for WebDriverAgent
84
84
  email: yi@zen.ly
85
85
  executables: []