screengrab 0.4.0 → 0.5.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
- data/README.md +15 -1
- data/lib/screengrab/runner.rb +4 -1
- data/version.properties +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3c2e526db2791c531486fdef0a50fb647644fe3
|
4
|
+
data.tar.gz: 2ae54fb11017acc35fc50ae5a7955fda2f2f9121
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7421606ad781981f72e68e02956942b8e4181c85b89856238c184642df199edf2f399332d27d99a56ece6cfdf54a9470f05d332d34c6ab4327f8e8246dc6c20d
|
7
|
+
data.tar.gz: 1298dfd3bd8987d5d12691599572e155d901ca449285bbd18a2f6521101aa75477ef6e771b3584ecb3e590adfaef7480cec90725d1c09cdb45ad1a8ca903f568
|
data/README.md
CHANGED
@@ -84,7 +84,21 @@ Ensure that the following permissions exist in your **src/debug/AndroidManifest.
|
|
84
84
|
- You can create your APKs with `./gradlew assembleDebug assembleAndroidTest`
|
85
85
|
- Once complete run `screengrab` in your app project directory to generate screenshots
|
86
86
|
- You will be prompted to provide any required parameters which are not in your **Screengrabfile** or provided as command line arguments
|
87
|
-
- Your screenshots will be saved
|
87
|
+
- Your screenshots will be saved to `fastlane/metadata/android` in the directory where you ran `screengrab`
|
88
|
+
|
89
|
+
## Improved screenshot capture with UI Automator
|
90
|
+
|
91
|
+
As of `screengrab` 0.5.0, you can specify different strategies to control the way `screengrab` captures screenshots. The newer strategy delegates to [UI Automator](https://developer.android.com/topic/libraries/testing-support-library/index.html#UIAutomator) which fixes a number of problems compared to the original strategy:
|
92
|
+
|
93
|
+
* Shadows/elevation are correctly captured for Material UI
|
94
|
+
* Multi-window situations are correctly captured (dialogs, etc.)
|
95
|
+
* Works on Android N
|
96
|
+
|
97
|
+
However, UI Automator requires a device with **API level >= 18**, so it is not yet the default strategy. To enable it for all screenshots by default, make the following call before your tests run:
|
98
|
+
|
99
|
+
```java
|
100
|
+
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
|
101
|
+
```
|
88
102
|
|
89
103
|
## Advanced Screengrabfile Configuration
|
90
104
|
|
data/lib/screengrab/runner.rb
CHANGED
@@ -220,7 +220,7 @@ module Screengrab
|
|
220
220
|
print_all: true,
|
221
221
|
print_command: true)
|
222
222
|
|
223
|
-
UI.user_error!
|
223
|
+
UI.user_error!("Tests failed", show_github_issues: false) if test_output.include?("FAILURES!!!")
|
224
224
|
end
|
225
225
|
end
|
226
226
|
|
@@ -303,6 +303,9 @@ module Screengrab
|
|
303
303
|
print_command: false).include?('No such file')
|
304
304
|
|
305
305
|
yield device_path
|
306
|
+
rescue
|
307
|
+
# Some versions of ADB will have a non-zero exit status for this, which will cause the executor to raise.
|
308
|
+
# We can safely ignore that and treat it as if it returned 'No such file'
|
306
309
|
end
|
307
310
|
|
308
311
|
def open_screenshots_summary(device_type_dir_name)
|
data/version.properties
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: screengrab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Falcone
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-08-
|
12
|
+
date: 2016-08-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fastlane_core
|
@@ -17,7 +17,7 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.50.0
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 1.0.0
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 0.
|
30
|
+
version: 0.50.0
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.0.0
|