appium_lib 10.3.1 → 10.4.0

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.
@@ -248,7 +248,13 @@ module Appium
248
248
  # https://github.com/YOU-i-Labs/appium-youiengine-driver
249
249
  Appium::Logger.debug('YouiEngine')
250
250
  else
251
- Appium::Logger.warn('no device matched')
251
+ case automation_name
252
+ when :youiengine
253
+ # https://github.com/YOU-i-Labs/appium-youiengine-driver
254
+ Appium::Logger.debug('YouiEngine')
255
+ else
256
+ Appium::Logger.debug('no device matched') # core also shows waring message
257
+ end
252
258
  end
253
259
  end
254
260
 
@@ -636,6 +642,38 @@ module Appium
636
642
  @driver.execute_async_script script, *args
637
643
  end
638
644
 
645
+ # Run a set of script against the current session, allowing execution of many commands in one Appium request.
646
+ # Supports {https://webdriver.io/docs/api.html WebdriverIO} API so far.
647
+ # Please read {http://appium.io/docs/en/commands/session/execute-driver command API} for more details
648
+ # about acceptable scripts and the output.
649
+ #
650
+ # @param [String] script The string consisting of the script itself
651
+ # @param [String] type The name of the script type.
652
+ # Defaults to 'webdriverio'. Depends on server implementation which type is supported.
653
+ # @param [Integer] timeout_ms The number of `ms` Appium should wait for the script to finish
654
+ # before killing it due to timeout.
655
+ #
656
+ # @return [Appium::Core::Base::Device::ExecuteDriver::Result] The script result parsed by
657
+ # Appium::Core::Base::Device::ExecuteDriver::Result.
658
+ #
659
+ # @raise [::Selenium::WebDriver::Error::UnknownError] If something error happens in the script.
660
+ # It has the original message.
661
+ #
662
+ # @example
663
+ # script = <<~SCRIPT
664
+ # const status = await driver.status();
665
+ # console.warn('warning message');
666
+ # return [status];
667
+ # SCRIPT
668
+ # r = @@driver.execute_driver(script: script, type: 'webdriverio', timeout: 10_000)
669
+ # r #=> An instance of Appium::Core::Base::Device::ExecuteDriver::Result
670
+ # r.result #=> The `result` key part as the result of the script
671
+ # r.logs #=> The `logs` key part as `{'log' => [], 'warn' => [], 'error' => []}`
672
+ #
673
+ def execute_driver(script: '', type: 'webdriverio', timeout_ms: nil)
674
+ @driver.execute_driver(script: script, type: type, timeout_ms: timeout_ms)
675
+ end
676
+
639
677
  def window_handles
640
678
  @driver.window_handles
641
679
  end
@@ -14,6 +14,6 @@
14
14
 
15
15
  module Appium
16
16
  # Version and Date are defined on the 'Appium' module, not 'Appium::Common'
17
- VERSION = '10.3.1' unless defined? ::Appium::VERSION
18
- DATE = '2019-04-11' unless defined? ::Appium::DATE
17
+ VERSION = '10.4.0' unless defined? ::Appium::VERSION
18
+ DATE = '2019-07-19' unless defined? ::Appium::DATE
19
19
  end
data/readme.md CHANGED
@@ -4,8 +4,6 @@
4
4
  [![Travis Master](https://travis-ci.org/appium/ruby_lib.svg?branch=master)](https://travis-ci.org/appium/ruby_lib/builds)
5
5
 
6
6
  [![Downloads](https://img.shields.io/gem/dt/appium_lib.svg)](https://rubygems.org/gems/appium_lib)
7
- [![Pull Requests](http://issuestats.com/github/appium/ruby_lib/badge/pr)](http://issuestats.com/github/appium/ruby_lib)
8
- [![Issues](http://issuestats.com/github/appium/ruby_lib/badge/issue)](http://issuestats.com/github/appium/ruby_lib)
9
7
 
10
8
  - [appium_lib on RubyGems](https://rubygems.org/gems/appium_lib)
11
9
  - [Documentation for appium_lib](https://github.com/appium/ruby_lib/tree/master/docs)
@@ -1,3 +1,11 @@
1
+ #### v10.4.0 2019-07-19
2
+
3
+ - [954a3a8](https://github.com/appium/ruby_lib/commit/954a3a8d4d5cd56fa5a4e80d021805759dbf5e10) Release 10.4.0
4
+ - [8289c9f](https://github.com/appium/ruby_lib/commit/8289c9f8e19fab754538f229e1a5513e2994dba3) fix warning message in driver detection (#864)
5
+ - [5e61241](https://github.com/appium/ruby_lib/commit/5e612419ccd4dc5f5bd8b657a972cce4113bf9e7) update core 3.2 (#863)
6
+ - [1f58984](https://github.com/appium/ruby_lib/commit/1f5898400dd1928bfe42ddd5f842d1f8738f2f76) Update readme.md (#861)
7
+
8
+
1
9
  #### v10.3.1 2019-04-11
2
10
 
3
11
  - [ef89749](https://github.com/appium/ruby_lib/commit/ef89749d25c7044fe27fa4b7c1adfd011b60bba1) Release 10.3.1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.3.1
4
+ version: 10.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-11 00:00:00.000000000 Z
12
+ date: 2019-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appium_lib_core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '3.1'
20
+ version: '3.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '3.1'
27
+ version: '3.2'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: nokogiri
30
30
  requirement: !ruby/object:Gem::Requirement