-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
narrative doc updates for installation
- Loading branch information
1 parent
4f5b1e3
commit 9d63a58
Showing
3 changed files
with
12 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,20 +34,14 @@ To ensure point number 1, SchnauzerUI smart swaps elements for given commands. L | |
## Error Handling | ||
UI tests can be brittle. Sometimes you simply want to write a long | ||
test flow (even when testing gurus tell you not too) without it bailing at the first slow page load. For this, SchnauzerUI | ||
provides the `catch-error:` command for gracefully recovering from errors and resuming test runs. We can improve the | ||
previous test example like so | ||
provides the `catch-error:` command for gracefully recovering from errors and resuming test runs: | ||
```SchnauzerUI | ||
# Type in username (located by labels) | ||
locate "Username" and type "[email protected]" | ||
# Type in password (located by placeholder) | ||
locate "Password" and type "Password123!" | ||
# Click the submit button (located by element text) | ||
locate "Submit" and click | ||
... | ||
# This page is quite slow to load, so we'll try again if something goes wrong | ||
catch-error: screenshot and refresh and try-again | ||
... | ||
................ | ||
``` | ||
Here, the `catch-error:` command gives us the chance to reset the page by refreshing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,14 @@ | ||
# Installation | ||
|
||
**** *Heads up, these instructions are a bit technical. If you don't feel confident installing | ||
this on your own, check out the youtube installation tutorial: todo create youtube install tutorial* **** | ||
|
||
Note: SchnauzerUI executes against running chromedriver and geckodriver processes, but handles downloading, | ||
running and stopping them itself. You should be able to do everything with just SchnauzerUI and the browser | ||
you want to test in. Just make sure to have ports 4444 and 9515 open. If you don't know what that means, | ||
then you're probably good to go. | ||
|
||
To install SchnauzerUI, check [github](https://github.com/bcpeinhardt/schnauzerUI) for a | ||
download link for your operating system. Be sure to save it somewhere in your PATH. | ||
download link for your operating system. Be sure to add it to your PATH. | ||
Alternatively, if you have the rust toolchain installed, you can build it from source by running | ||
`cargo install https://github.com/bcpeinhardt/schnauzerUI` | ||
Also, go ahead and add `$HOME/.webdrivers` to your path as well. This is where chromedriver | ||
and geckodriver will be downloaded to. | ||
`cargo install --git https://github.com/bcpeinhardt/schnauzerUI` | ||
|
||
Hopefully, a browser opened up on your computer. In the terminal, you will be prompted for a name for your script. | ||
Once you've done that, you'll be prompted for a command. Try `url "https://youtube.com"`. | ||
The browser should navigate to youtube, and once the page has loaded, the terminal will ask whether you want to save | ||
the step. Just hit enter to auto save and keep going. | ||
To verify proper installation, try running `sui -i` from a terminal. | ||
Hopefully, a chrome browser opened up on your computer. In the terminal, follow the prompts | ||
until you're asked for a command. Try `url "https://youtube.com"`, and the open chrome browser | ||
should navigate to youtube. Hit enter to save the command after it executes. | ||
|
||
Congrats! You're all set up. To quit, type `exit` in the terminal and hit enter. It should close the browser for you, | ||
but not before asking if you want to save your script. Type "N" to discard the script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters