AXElements 7.0.0.pre5 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/History.markdown +1 -0
- data/lib/accessibility/dsl.rb +12 -27
- data/lib/accessibility/version.rb +1 -1
- data/lib/ax/element.rb +20 -0
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27c2ab0e5f551e930564c657754b5832410584c0
|
4
|
+
data.tar.gz: 9be9780c14312a8c8d395b55e110e655762f90f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2534f8e74ec7d9ec97b2ff56e3053a554e0ca10fb52230ae9fc53d72c410a8205b4bd1b9cf4ac495f662918cd99ccb9e5967f94aa6e85cbb18d93b68472f04bb
|
7
|
+
data.tar.gz: 8bac00e64a61e96c63b993230869dc09df7b224a787e4283b715f59e6ea95cbd0bc37f00d79a288f39ee9e7d92448d2402ac99e39f6ba56bd285259843825e7a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
�>�U�k]��<]�xk�o
|
2
|
+
Ʌދ]Q�V��W�b�}��+H=�*�K'eT����9��.:l���ʜ+�t'����o�S��AH:�p�g*O�c����B�{GjD���i60�^��,U8v���!�9J�;ve^�����n�{S�[�O4RV�t�t�C�Bi"\_��������Y���6d����Q'�M��,0C���n|�lX�vB���w�2�h��Gv�4Yx�!V�5���yca
|
data/History.markdown
CHANGED
data/lib/accessibility/dsl.rb
CHANGED
@@ -804,43 +804,28 @@ module Accessibility::DSL
|
|
804
804
|
alias_method :graph_for, :graph
|
805
805
|
|
806
806
|
##
|
807
|
-
# Take a screen shot and save it to disk. If a file
|
808
|
-
#
|
809
|
-
#
|
810
|
-
# automatically be appended to the file name.
|
807
|
+
# Take a screen shot and save it to disk. If a file path is not
|
808
|
+
# given then the default value will put it on the desktop. The
|
809
|
+
# actual file name will automatically generated with a timestamp.
|
811
810
|
#
|
812
811
|
# @example
|
813
812
|
#
|
814
813
|
# screenshot
|
815
814
|
# # => "~/Desktop/AXElements-ScreenShot-20120422184650.png"
|
816
815
|
#
|
817
|
-
# screenshot app.
|
816
|
+
# screenshot app.main_window
|
818
817
|
# # => "~/Desktop/Safari-20120422184650.png"
|
819
818
|
#
|
820
|
-
# screenshot app.
|
821
|
-
# # => "/Volumes/SecretStash/
|
819
|
+
# screenshot app.main_window, "/Volumes/SecretStash"
|
820
|
+
# # => "/Volumes/SecretStash/AXElements-ScreenShot-20150622032250.png"
|
822
821
|
#
|
823
|
-
# @param
|
824
|
-
# @param
|
822
|
+
# @param rect [#to_rect]
|
823
|
+
# @param path [#to_s]
|
825
824
|
# @return [String] path to the screenshot
|
826
|
-
def screenshot
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
dir = File.expand_path dir.to_s
|
831
|
-
file = "#{dir}/#{name}-#{Time.now.strftime '%Y%m%d%H%M%S'}.png"
|
832
|
-
|
833
|
-
cg_image = CGWindowListCreateImage(CGRectInfinite,
|
834
|
-
KCGWindowListOptionOnScreenOnly,
|
835
|
-
KCGNullWindowID,
|
836
|
-
KCGWindowImageDefault)
|
837
|
-
NSBitmapImageRep
|
838
|
-
.alloc
|
839
|
-
.initWithCGImage(cg_image)
|
840
|
-
.representationUsingType(NSPNGFileType, properties: nil)
|
841
|
-
.writeToFile(file, atomically: false)
|
842
|
-
|
843
|
-
file
|
825
|
+
def screenshot rect = CGRect.new(CGPoint.new(0, 0), CGSize.new(-1, -1)),
|
826
|
+
path = '~/Desktop'
|
827
|
+
require 'accessibility/screen_shooter'
|
828
|
+
ScreenShooter.shoot rect.to_rect, path
|
844
829
|
end
|
845
830
|
alias_method :capture_screen, :screenshot
|
846
831
|
|
data/lib/ax/element.rb
CHANGED
@@ -423,6 +423,26 @@ class AX::Element
|
|
423
423
|
output
|
424
424
|
end
|
425
425
|
|
426
|
+
##
|
427
|
+
# Take a screen shot of the receiving element and save it to disk. If a
|
428
|
+
# file path is not given then the default value will put it on the
|
429
|
+
# desktop. The actual file name will automatically generated with a
|
430
|
+
# timestamp.
|
431
|
+
#
|
432
|
+
# @example
|
433
|
+
#
|
434
|
+
# app.main_window.screenshot
|
435
|
+
# # => "~/Desktop/AXElements-ScreenShot-20120422184650.png"
|
436
|
+
#
|
437
|
+
# app.main_window.screenshot "/Volumes/SecretStash"
|
438
|
+
# # => "/Volumes/SecretStash/AXElements-ScreenShot-20150622032250.png"
|
439
|
+
#
|
440
|
+
# @param path [#to_s]
|
441
|
+
# @return [String] path to the screenshot
|
442
|
+
def screenshot path = '~/Desktop'
|
443
|
+
capture_screen self, path
|
444
|
+
end
|
445
|
+
|
426
446
|
##
|
427
447
|
# Overriden to respond properly with regards to dynamic attribute
|
428
448
|
# lookups, but will return false for potential implicit searches.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: AXElements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.0
|
4
|
+
version: 7.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rada
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
0WHcut5WdsOnrIkVkbvgxDUtQclWeulaIRqGkvnajtp2FJdRsi/n8zo3nAfeR6QM
|
31
31
|
vkReJWGG0H8U/JJqYfQBZopYOUMnLJQxN+NA4w==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-
|
33
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: mouse
|
@@ -66,14 +66,14 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: 0.6.1
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 0.
|
76
|
+
version: 0.6.1
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: accessibility_keyboard
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
@@ -191,9 +191,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
193
|
requirements:
|
194
|
-
- - "
|
194
|
+
- - ">="
|
195
195
|
- !ruby/object:Gem::Version
|
196
|
-
version:
|
196
|
+
version: '0'
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
199
|
rubygems_version: 2.4.3
|
metadata.gz.sig
CHANGED
Binary file
|