Skip to content

Commit

Permalink
Fix Android fast duration
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline committed Sep 20, 2013
1 parent c81bba8 commit cb38755
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/appium_lib/android/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,12 @@ def page
# JavaScript code from https://github.com/appium/appium/blob/master/app/android.js
#
# ```javascript
# Math.round((duration * 1000) / 200)
# (.20 * 1000) / 200 = 1
# Math.round(1.0/28.0 * 28) = 1
# ```
#
# We want steps to be exactly 1. If it's zero then a tap is used instead of a swipe.
def fast_duration
0.20
0.0357 # 1.0/28.0
end

# Lists package, activity, and adb shell am start -n value for current app.
Expand Down

0 comments on commit cb38755

Please sign in to comment.