Skip to content

Commit

Permalink
silence warning for pointeractions (#113)
Browse files Browse the repository at this point in the history
* silence warning for pointeractions

* update changelog
  • Loading branch information
KazuCocoa authored Jul 27, 2018
1 parent 534c017 commit cdef904
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.

## [Unreleased]
### Enhancements
- silence warning for pointeractions [#113](/~https://github.com/appium/ruby_lib_core/pull/113)

### Bug fixes

Expand Down
10 changes: 9 additions & 1 deletion lib/appium_lib_core/common/base/bridge/w3c.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ module Core
class Base
class Bridge
class W3C < ::Selenium::WebDriver::Remote::W3C::Bridge
def self.silence_warnings_redefining(&block)
warn_level = $VERBOSE
$VERBOSE = nil
result = block.call
$VERBOSE = warn_level
result
end

include Device::DeviceLock
include Device::Keyboard
include Device::ImeActions
Expand All @@ -22,7 +30,7 @@ class W3C < ::Selenium::WebDriver::Remote::W3C::Bridge

# Used for default duration of each touch actions
# Override from 250 milliseconds to 50 milliseconds
::Selenium::WebDriver::PointerActions::DEFAULT_MOVE_DURATION = 0.05
W3C.silence_warnings_redefining { ::Selenium::WebDriver::PointerActions::DEFAULT_MOVE_DURATION = 0.05 }

def commands(command)
::Appium::Core::Commands::W3C::COMMANDS[command]
Expand Down

0 comments on commit cdef904

Please sign in to comment.