lib/appium_lib/common/patch.rb in appium_lib-0.5.7 vs lib/appium_lib/common/patch.rb in appium_lib-0.5.8
- old
+ new
@@ -55,10 +55,10 @@
#
# https://github.com/appium/appium/wiki/Automating-mobile-gestures
# @return [OpenStruct] the relative x, y in a struct. ex: { x: 0.50, y: 0.20 }
def location_rel
xy = self.location
- w = window_size
+ w = $driver.window_size
OpenStruct.new( x: xy.x.to_f / w.width.to_f,
y: xy.y.to_f / w.height.to_f )
end
end
end # module Appium::Common
\ No newline at end of file