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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a218d047926f409658348d79a6f33bc7a464936d2d2fa48d4c2502ac3d3a53a
4
- data.tar.gz: e97d0c934fe411307319c4f6b90273166bc76f40728a3b14dd73e0b0e9977763
3
+ metadata.gz: 0b0a28cd4900b9e070895f7123308a242823fc2cb8f441785c770024b5a4dd7e
4
+ data.tar.gz: feee8742d9d5ca63ce082e594189c90353f356f9080c17e755ded8db34ebc54a
5
5
  SHA512:
6
- metadata.gz: a1d396507c1b49d56de705f1c9bb86929759ccc94fa060321cbb6a3dc12f456a269ca788ab1734af3403c48a86b749582dfd63682ecb4f00bcef581fc9a36e83
7
- data.tar.gz: 158ec794408ab26b4fc93305c7a7044aa9570e2b1f710d5ad72279e683d54c35472d258f41b901f4a565687395440dd1f7f6dd50fd8d882a1a0ccd84384d7aab
6
+ metadata.gz: 471799eb01e1d643a861b7a24a9cfd04657b1dcd5710c2a098135fd97983c8bccd2372423b16816dc42283c59d5de13cbe0e89166af43d06cb110a51dad5fab1
7
+ data.tar.gz: df9f81ffa88a08c40ab4231fb5f5f65b49d459ad7de27f5fb7c888f99edbaa464ecf25d4e47bbfae2e9758ad8f4637c75638aef2468a586be427d6f9cb68cd3c
@@ -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
- `xdotool mousemove #{klikX} #{klikY} click 1`
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
 
@@ -1,3 +1,3 @@
1
1
  module Superbara
2
- VERSION = "0.14.6"
2
+ VERSION = "0.14.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superbara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.6
4
+ version: 0.14.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula