We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf45140 commit 631c584Copy full SHA for 631c584
lib/appium_lib/common/helper.rb
@@ -223,8 +223,8 @@ def px_to_window_rel opts={}
223
x = opts.fetch :x, 0
224
y = opts.fetch :y, 0
225
226
- OpenStruct.new( x: x.to_f / w.width.to_f,
227
- y: y.to_f / w.height.to_f )
+ OpenStruct.new( x: "#{x.to_f} / #{w.width.to_f}",
+ y: "#{y.to_f} / #{w.height.to_f}" )
228
end
229
230
def lazy_load_strings
lib/appium_lib/common/patch.rb
@@ -58,8 +58,8 @@ def tag_name
58
def location_rel
59
xy = self.location
60
w = $driver.window_size
61
- OpenStruct.new( x: xy.x.to_f / w.width.to_f,
62
- y: xy.y.to_f / w.height.to_f )
+ OpenStruct.new( x: "#{xy.x.to_f} / #{w.width.to_f}",
+ y: "#{xy.y.to_f} / #{w.height.to_f}" )
63
64
65
end # module Appium::Common
0 commit comments