Document not found (404)
+This URL is invalid, sorry. Please use the navigation bar or search to continue.
+ +diff --git a/.github/workflows/deploy_narrative_docs.yaml b/.github/workflows/deploy_narrative_docs.yaml new file mode 100644 index 0000000..da15123 --- /dev/null +++ b/.github/workflows/deploy_narrative_docs.yaml @@ -0,0 +1,33 @@ +name: Deploy +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Install mdbook + run: | + mkdir mdbook + curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook + echo `pwd`/mdbook >> $GITHUB_PATH + - name: Deploy GitHub Pages + run: | + cd narrative_docs + mdbook build + git worktree add gh-pages + git config user.name "Deploy from CI" + git config user.email "" + cd gh-pages + # Delete the ref to avoid keeping history. + git update-ref -d refs/heads/gh-pages + rm -rf * + mv ../book/* . + git add . + git commit -m "Deploy $GITHUB_SHA to gh-pages" + git push --force --set-upstream origin gh-pages \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..088ba6b --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Generated by Cargo +# will have compiled files and executables +/target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk diff --git a/404.html b/404.html new file mode 100644 index 0000000..980dc21 --- /dev/null +++ b/404.html @@ -0,0 +1,173 @@ + + +
+ + +This URL is invalid, sorry. Please use the navigation bar or search to continue.
+ +Schnauzer UI tries to be smart about the way it interacts with HTML, so the person +writing the test rarely has to look the underlying HTML of a page. This page outlines +some of the strategies it takes to achieve that.
+Schnauzer UI tries to make it easy to locate and interact with web elements based +on only visible information on the page (i.e. without having to look at HTML). +One way it does this is by acknowledging that HTML elements are often used together +in common patterns (many are designed this way).
+When Schnauzer UI can, it will try to make a judgement call about the element you +actually want to interact with vs the element you were able to locate on the page, and +swap them out for appropriate commands.
+For input, textarea, and select elements, if you are able to locate
+then Schnauzer UI will swap the element on click
and type
commands
Additionally, select
commands will do the same, as well as check to see if the currently located element is
+an option inside a select.
Often times, the real world components we're testing are fancy. +The produced HTML can have several layers that shift around while we interact with them. +Schnauzer UI tries to make these components easier to test by acting as closely to a person as possible.
+The click
command does not click the located element. It registers a click event at the center of the elements
+location on the page. This helps to reduce headaches around which element should actually be clicked
+(in my experience, dealing with click intercepted errors is half of day to day selenium use).
Similarly, the type
command doesn't type into the located element. It clicks the currently located element, and
+then types into the active element. This is what people do, and it helps with fancy search dropdowns and things
+that use javascript to swap out elements underneath you after registering a click.
HTML is fundamentally a tree structure, and it's structure isn't necessarily related to the way a webpage is +layed out (CSS and JavaScript have a tendency to move things around). +Often though, HTML elements are composed something like this.
+<div id="container">
+ <div id="header">
+ I am a heading of some section of this page
+ </div>
+ <div id="content">
+ <p>I am some content</p>
+ <div id="sub-content">
+ ... more html
+ </div>
+ </div>
+</div>
+
+Pieces of HTML that related to each other get wrapped up in a container, with some kind of title/heading +at the top followed by the content of the component. +Often the HTML is more deeply nested than this. For example, here's the sample HTML for a Bootstrap card
+<div class="card" style="width: 18rem;">
+ <img class="card-img-top" src="..." alt="Card image cap">
+ <div class="card-body">
+ <h5 class="card-title">Card title</h5>
+ <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
+ </div>
+ <ul class="list-group list-group-flush">
+ <li class="list-group-item">Cras justo odio</li>
+ <li class="list-group-item">Dapibus ac facilisis in</li>
+ <li class="list-group-item">Vestibulum at eros</li>
+ </ul>
+ <div class="card-body">
+ <a href="#" class="card-link">Card link</a>
+ <a href="#" class="card-link">Another link</a>
+ </div>
+</div>
+
+Schnauzer UI takes advantage of this common organization strategy when helping you locate elements with visual
+information. The under
command changes the way locators work, so that the search for your element begins where
+you want it to.
One could type under "Card title" locate "Card link" and click
, and expect the Card link to be correctly selected and clicked. Schnauzer UI will start with the h5 element and walk up the tree to the parent element, until the current element contains the one it's looking for.
+This is especially useful for buttons/labels/placeholders that get repeated several places on a page. Think "add to cart", "see more...", etc. on gallery type pages.
SchnauzerUI is a human readable DSL for performing automated UI testing in the browser. +The main goal of SchnauzerUI is to increase stakeholder visibility and participation in automated Quality Assurance testing.
+SchnauzerUI lets non-programmers create automated tests from start to finish, without +out ever needing to involve a developer. To demonstrate, lets look at the SchnauzerUI +code necessary to search for cats on youtube.
+url "https://youtube.com"
+locate "Search" and type "cats" and press "Enter"
+
+This is the only code necessary to write in order to run the test in a live +browser and generate a test report.
+We are subscribing to the Divio documentation system, so this document is composed of four sections:
+To get started, checkout the quickstart tutorial
+ +