Skip to content

Instantly share code, notes, and snippets.

@Zarkonnen
Created June 12, 2012 14:51
Show Gist options
  • Save Zarkonnen/2917988 to your computer and use it in GitHub Desktop.
Save Zarkonnen/2917988 to your computer and use it in GitHub Desktop.
Start Firefox (like a boss)
(When you follow these steps, make sure page content is loaded before clicking, etc... Since you're a human, this is probably what you do already)
- Navigate to http://saucelabs.com/test/guinea-pig/
- Click the link which says "i am a link"
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'title'. Ok, into that bucket, put the title of the page
- Wait until the page title is "(whatever's in the bucket in your brain we named 'title')"
- Make sure the title of the website is "(whatever's in the bucket in your brain we named 'title')"
- Make sure the title of the website is not "asdf"
- If the title of the website is not "(whatever's in the bucket in your brain we named 'title')", scream at the coders
- If the title of the website is "asdf", scream at the coders
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'url'. Ok, into that bucket, put the current url
- Wait until the current url is "(whatever's in the bucket in your brain we named 'url')"
- Make sure the url in the address bar is "(whatever's in the bucket in your brain we named 'url')"
- Make sure the url in the address bar is not "http://google.com"
- Wait until the current url is not "http://google.com"
- If the url in the address bar is not "(whatever's in the bucket in your brain we named 'url')", scream at the coders
- If the url in the address bar is "http://google.com", scream at the coders
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'text'. Ok, into that bucket, put the text in "i_am_an_id"
- Wait until the text of the element on the page with the id of "i_am_an_id" is "(whatever's in the bucket in your brain we named 'text')"
- Make sure the text in the element on the page with the id of "i_am_an_id" is "(whatever's in the bucket in your brain we named 'text')"
- Wait until the text of the element on the page with the id of "i_am_an_id" is not "not (whatever's in the bucket in your brain we named 'text')"
- Make sure the text in the element on the page with the id of "i_am_an_id" is not "not (whatever's in the bucket in your brain we named 'text')"
- If the text in the element on the page with the id of "i_am_an_id" is not "(whatever's in the bucket in your brain we named 'text')", scream at the coders
- If the text in the element on the page with the id of "i_am_an_id" is "not (whatever's in the bucket in your brain we named 'text')", scream at the coders
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'text_is_present'. Ok, into that bucket, put whether or not "I am another div" is anywhere on the page
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'text_present'. Ok, into that bucket, put "I am another div"
- Wait until "(whatever's in the bucket in your brain we named 'text_present')" is on the page
- Make sure "(whatever's in the bucket in your brain we named 'text_present')" is on the page
- Wait until "not (whatever's in the bucket in your brain we named 'text_present')" is not on the page
- Make sure "not (whatever's in the bucket in your brain we named 'text_present')" is not on the page
- If "(whatever's in the bucket in your brain we named 'text_present')" is not on the page, scream at the coders
- If "not (whatever's in the bucket in your brain we named 'text_present')" is on the page, scream at the coders
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'body_text'. Ok, into that bucket, put all the text on the page
- Wait until the text of the site is "(whatever's in the bucket in your brain we named 'body_text')"
- Make sure the whole content of the page is "(whatever's in the bucket in your brain we named 'body_text')"
- Wait until the text of the site is not "not (whatever's in the bucket in your brain we named 'body_text')"
- Make sure the whole content of the page is not "not (whatever's in the bucket in your brain we named 'body_text')"
- If the whole content of the page is not "(whatever's in the bucket in your brain we named 'body_text')", scream at the coders
- If the whole content of the page is "not (whatever's in the bucket in your brain we named 'body_text')", scream at the coders
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'page_source'. Ok, into that bucket, put the codez that make this website
- Wait until the page source is "(whatever's in the bucket in your brain we named 'page_source')"
- Make sure the page source is "(whatever's in the bucket in your brain we named 'page_source')"
- Wait until the page source is not "<!-- --> (whatever's in the bucket in your brain we named 'page_source')"
- Make sure the page source is not "<!-- --> (whatever's in the bucket in your brain we named 'page_source')"
- If the page source is not "(whatever's in the bucket in your brain we named 'page_source')", scream at the coders
- If the page source is "<!-- --> (whatever's in the bucket in your brain we named 'page_source')", scream at the coders
- You're supposed to add a cookie called "test_cookie" with the value of "this-is-a-cookie", but that's hard since you're not a computer. I suggest baking a batch of real cookies instead.
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'cookie_is_present'. Ok, into that bucket, put whether or not a cookie called "test_cookie" exists (or just check whether there are cookies in your pantry)
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'cookie'. Ok, into that bucket, put the value of the cookie called "test_cookie"
- Print this on a printer: "(whatever's in the bucket in your brain we named 'cookie');". Then take the paper to your boss and say "Here's that thing you wanted.". Boom!
- Wait until the cookie called "test_cookie" is present
- Make sure there is a cookie whose name is "test_cookie"
- If there is not a cookie whose name is "{name"}, scream at the coders
- Wait until the value of the cookie called "test_cookie" is "(whatever's in the bucket in your brain we named 'cookie')"
- Check the cookie whose name is "test_cookie". Make sure its value is "(whatever's in the bucket in your brain we named 'cookie')"
- Wait until the value of the cookie called "test_cookie" is not "not (whatever's in the bucket in your brain we named 'cookie')"
- Check the cookie whose name is "test_cookie". Make sure its value is not "not (whatever's in the bucket in your brain we named 'cookie')"
- Check the cookie whose name is "test_cookie". If its value is not "(whatever's in the bucket in your brain we named 'cookie')", scream at the coders
- Check the cookie whose name is "test_cookie". If its value is "not (whatever's in the bucket in your brain we named 'cookie')", scream at the coders
- You're supposed to delete a cookie called "test_cookie", but that's hard since you're not a computer. I suggest making a real cookie disappear instead.
- Wait until the cookie called "test_cookie" is not present
- Make sure there is not a cookie whose name is "test_cookie"
- If there is a cookie whose name is "{name"}, scream at the coders
- Click the refresh button
- Click the back button
- Click the forward button
- Click the back button
- Wait until "comments" is on the page
- Take a screenshot of the page and make sure the file is called "/tmp/screen.png"
- Print this on a printer: "this is some debug text". Then take the paper to your boss and say "Here's that thing you wanted.". Boom!
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'element_is_selected'. Ok, into that bucket, put whether or not "unchecked_checkbox" is selected
- Select the element on the page with the id of "unchecked_checkbox"
- Wait until the element on the page with the id of "unchecked_checkbox" is selected
- Make sure the element on the page with the id of "unchecked_checkbox" is selected
- If the element on the page with the id of "unchecked_checkbox" is not selected, scream at the coders
- Deselect the element on the page with the id of "unchecked_checkbox"
- Make sure the element on the page with the id of "unchecked_checkbox" is not selected
- If the element on the page with the id of "unchecked_checkbox" is selected, scream at the coders
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'link_href'. Ok, into that bucket, put the value of the "href" attribute of "i am a link"
- Wait until the "href" attribute of the link which says "i am a link" is "(whatever's in the bucket in your brain we named 'link_href')"
- Make sure the link which says "i am a link" has a "href" attribute which is "(whatever's in the bucket in your brain we named 'link_href')"
- If the link which says "i am a link" has a "href" attribute which is not (whatever's in the bucket in your brain we named 'link_href'), scream at the coders
- Type "w00t" in "comments"
- Wait until the "href" attribute of the link which says "i am a link" is not "not (whatever's in the bucket in your brain we named 'link_href')"
- Make sure the link which says "i am a link" has a "href" attribute which is not "not (whatever's in the bucket in your brain we named 'link_href')"
- If the link which says "i am a link" has a "href" attribute which is not (whatever's in the bucket in your brain we named 'link_href'), scream at the coders
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'comments'. Ok, into that bucket, put the value of "comments"
- Wait until the value of the element on the page with the id of "comments" is "w00t"
- Make sure the element on the page with the id of "comments" has a value which is "w00t"
- If the element on the page with the id of "comments" has a value which is not "w00t", scream at the coders
- Wait until the value of the element on the page with the id of "comments" is not "not w00t"
- Make sure the element on the page with the id of "comments" has a value which is not "not w00t"
- If the element on the page with the id of "comments" has a value which is "not w00t", scream at the coders
- Submit the form containing the element on the page with the id of "comments"
- Make sure "w00t" is on the page
You're done! Sweet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment