README.md in snapshot-0.0.2 vs README.md in snapshot-0.1.0
- old
+ new
@@ -20,10 +20,11 @@
-------
[Features](#features) •
[Installation](#installation) •
+[UI Automation](#ui-automation) •
[Quick Start](#quick-start) •
[Usage](#usage) •
[Tips](#tips) •
[Need help?](#need-help)
@@ -33,21 +34,53 @@
# Features
- Create hundreds of screenshots in multiple languages on all simulators
- Configure it once, store the configuration in git
- Do something else, while the computer takes the screenshots for you
- Very easy to integrate with ```deliver```
+- ```Snapshot``` automatically waits for network requests to be finished before taking a screenshot (we don't want loading images in the App Store screenshots)
+## Why?
+This gem automatically switches the language and device type and runs the automation script to take all screenshots.
+
+**Why use ```snapshot``` instead of....**
+
+- **UI Automation in Instruments**: Instruments can only run your app on one device in one language. You have to manually switch it.
+- **[ui-screen-shooter](https://github.com/jonathanpenn/ui-screen-shooter)**: This ist the best alternative out there right now. It's based on AppleScript, you can not update it properly and there are quite some hacks in there. ```Snapshot``` uses a very similar technique - just in a clean and maintainable Ruby gem.
+- **[Subliminal](https://github.com/inkling/Subliminal)**: A good approach to write the interaction code in Objective C. Unfortunately it has a lot of open issues with the latest release of Xcode.
+
# Installation
Install the gem
sudo gem install snapshot
Make sure, you have the latest version of the Xcode command line tools installed:
xcode-select --install
+
+# UI Automation
+## Get started
+This project uses Apple's ```UI Automation``` under the hood. I will not go into detail on how to write scripts.
+
+Here a few links to get started:
+
+- [Apple's official documentation](https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/UsingtheAutomationInstrument/UsingtheAutomationInstrument.html)
+- [UI Automation: An Introduction (cocoamanifest.net)](http://cocoamanifest.net/articles/2011/05/uiautomation-an-introduction.html)
+- [Functional Testing UI Automation (mattmccomb.com)](http://www.mattmccomb.com/blog/2013/06/02/ios-functional-testing-with-uiautomation/)
+
+## Record your first script
+Profile your app (CMD + I), choose ```Automation``` and click the Record button on the bottom of the window.
+
+This will get you started. Save the generated file with the extension ```js``` into your project root.
+
+Add ```#import "SnapshotHelper.js"``` on the top of your file.
+
+Now you can use ```captureLocalizedScreenshot('0-name')``` to take a snapshot.
+
+You can take a look at the example project to play around with it.
+
# Quick Start
The guide will create all the necessary files for you, using the existing app metadata from iTunes Connect.
@@ -90,11 +123,11 @@
"de-DE",
"es-ES"
])
```
-### Javascript file
+### JavaScript file
Usually ```snapshot``` automatically finds your JavaScript file. If that's not the case, you can pass the path
to your test file.
```ruby
js_file './path/file.js'
```
@@ -103,10 +136,16 @@
To not be asked which scheme to use, just set it like this:
```ruby
scheme "Name"
```
+### Screenshots output path
+All generated screenshots will be stored in the given path.
+```ruby
+screenshots_path './screenshots'
+```
+
### Project Path
By default, ```snapshot``` will look for your project in the current directory. If it is located somewhere else, pass your custom path:
```ruby
project_path "./my_project/Project.xcworkspace"
```
@@ -126,10 +165,10 @@
```
## Use a clean status bar
You can use [SimulatorStatusMagic](https://github.com/shinydevelopment/SimulatorStatusMagic) to clean up the status bar.
-## Editing the ```Deliverfile```
+## Editing the ```Snapfile```
Change syntax highlighting to *Ruby*.
# Need help?
- If there is a technical problem with ```Snapshot```, submit an issue. Run ```snapshot --trace``` to get the stacktrace.
- I'm available for contract work - drop me an email: snapshot@felixkrause.at