selenium basics

Download Selenium Basics

Post on 25-May-2015

2.043 views

Category:

Technology

1 download

Embed Size (px)

TRANSCRIPT

  • 1. Intro* Im Dave HaeffnerShow of hands* Ive been doing QA and automated new to Selenium?web testing for 4 yearssome experience with?* Most of that time was spent at experienced?The Motley Fool* More recently I started my own new to programming?consulting company and work with some experience with?soft ware development shops to helpexperienced?them with QA strategy andnot sure how to answer?implementing automated webtesting SELENIUM BASICSbrought to you by the QA LoungeTuesday, September 25, 12

2. WHAT IS SELENIUM? TELLME LIKE IM 5. Selenium is a soft ware robot sent from the future to test our soft ware.Tuesday, September 25, 12 3. PREFACEThere are many ways to implement Selenium & a frameworkI will show you one that has worked for meThere will be code involved (and opinions!) These examples do not reect a comprehensive QA strategy But its a good startTuesday, September 25, 12 4. SELENIUM IDEI debated showing you the IDE since its the unlovedchild of the Selenium community.But it is responsible for the wide spread success ofSelenium.I consider it to be less of an unloved orphan andmore of a gateway drugTuesday, September 25, 12 5. SELENIUM IDIOMS Verify vs. Assert Location, location, location! ClickAndWait, and wait, and wait...Tuesday, September 25, 12 6. LET ME EXPLAIN Rubyis approachable -- it can read like English Theresalso that standing on the shoulder of giants thing RSpec is an open-source testing tool built in Ruby for Ruby Itskind of a big deal Loads of functionality out of the box Quite customizableTuesday, September 25, 12 7. SHUT UP AND SHOW ME THE CODE!Tuesday, September 25, 12 8. COMMON ACTIONSNameActionSub-Action get fetch a page navigatesame as getto, forward, back (:id, idtext) (:class, classtext) (:tag_name, tagtext) nd_element (:name, nametext) click, text(a.k.a. by strategies) (:link, linktext) (:partial_link_text, ) (:css, csstext)Tuesday, September 25, 12 9. HONORABLE MENTION Movingbetween windows and frames Pop-updialogs Dragand Drop Cookies Changingthe User AgentTuesday, September 25, 12 10. ASSERTIONS THRU RSPECThingAction Sub-Action include(text) start_with(text) end_with(text)equal(expected) should be(expected)object should_notbe > expectedbe >= expectedbe