superbara 0.14.6 → 0.14.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/superbara/dsl.rb +6 -1
- data/lib/superbara/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b0a28cd4900b9e070895f7123308a242823fc2cb8f441785c770024b5a4dd7e
|
4
|
+
data.tar.gz: feee8742d9d5ca63ce082e594189c90353f356f9080c17e755ded8db34ebc54a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 471799eb01e1d643a861b7a24a9cfd04657b1dcd5710c2a098135fd97983c8bccd2372423b16816dc42283c59d5de13cbe0e89166af43d06cb110a51dad5fab1
|
7
|
+
data.tar.gz: df9f81ffa88a08c40ab4231fb5f5f65b49d459ad7de27f5fb7c888f99edbaa464ecf25d4e47bbfae2e9758ad8f4637c75638aef2468a586be427d6f9cb68cd3c
|
data/lib/superbara/dsl.rb
CHANGED
@@ -105,11 +105,16 @@ return Array.from(
|
|
105
105
|
|
106
106
|
def klik(selector, options={})
|
107
107
|
Superbara.output "clicking '#{selector}' with #{options.inspect}"
|
108
|
+
platform = RUBY_PLATFORM
|
108
109
|
el = find selector, options
|
109
110
|
coords = el.location
|
110
111
|
klikX = coords["x"] + coords["width"] / 2
|
111
112
|
klikY = coords["y"] + coords["height"] / 2
|
112
|
-
|
113
|
+
if platform.downcase.include? 'linux'
|
114
|
+
`xdotool mousemove #{klikX} #{klikY} click 1`
|
115
|
+
else
|
116
|
+
`cliclick c:#{klikX.floor},#{klikY.floor}`
|
117
|
+
end
|
113
118
|
return el
|
114
119
|
end
|
115
120
|
|
data/lib/superbara/version.rb
CHANGED