Cucumber & Cheese Errata

Please report all errata from my Cucumber & Cheese book here. Thanks for taking the time to help me make this book as good as possible.

103 thoughts on “Cucumber & Cheese Errata

  1. I am not sure how to specify the page, but I will try. I am reading the epub version on iPad, if that helps.

    Page 3 (Acknowledgments chapter): “Wwhether” should be “Whether”
    Page 5 (Preface chapter): “andRuby” should be “and Ruby”
    Page 6 (Getting help chapter): “CHeese” should be “Chesse” (I guess that is the same as Alister’s page 4).

  2. p6. There is no way to be sure that the defect does not //effect// later behavior.
    do you mean “affect”? If you want to say effect, it would be best to say it as “does not have an effect on later behavior”.

    p9. “This is //ture// cost //to// effects the bottom line.”
    This is //true// cost //and has an effect on// the bottom line (just a thought).

    p9. Developers take the requirements provided and construct the code that is compiled into the requested software. //desired software.//
    Sentence fragment? is this meant to be a longer sentence, or is this a leftover from the previous sentence?

    p.11 “All of these modes of //transportaion// would more than likely end in the same result but one of these approaches //is the superior//.”
    All of these modes of //transportation// would more than likely end in the same result, but one of these approaches //is superior//.”

    p. 11 “It is very //repetative// and mind numbing.”
    “It is very //repetitive// and mind numbing.”

    p. 11 “//Repetative// tasks that must be executed exactly the same time again and again are very well suited for automation.”
    //Repetitive// tasks that must be executed exactly the same time, again and again, are very well suited for automation.

    p.12 “structured //explority// testing just to name one.”
    structured //exploratory// testing, just to name one.

    p. 12 “Sometimes they might be afraid of change or afraid that automation might lead to //they// elimination of jobs.”
    Sometimes they might be afraid of change or afraid that automation might lead to //the// elimination of //their// jobs.

    p. 12 “I do not have hard numbers for this but //i// frequently ask attendees”
    I do not have hard numbers for this but //I// frequently ask attendees

    More to come ;).

  3. p. 12 “The team must troubleshoot each test failure to determine if it truly is a defect or if somehow the data has yet again been changed underneith the test.”
    The team must troubleshoot each test failure to determine if it truly is a defect, or if somehow the data has yet again been changed //underneath// the test.

    p. 14 “This //informationis// related to how the tests will interact with the system under test.”
    This //information is// related to how the tests will interact with the system under test.

    p. 14 “No //long// do we have the developer writing the code and the tester trying to find defects.
    No //longer// do we have the developer writing the code and the tester trying to find defects.

    p.14 “We would //not// longer have to worry about inconsistencies between different peoples interpretation of the “real requirements”.
    We would //no// longer have to worry about inconsistencies between different peoples interpretation of the “real requirements”.

    p.16 “You probably //// this list would detail out some specifics related to automation.”
    You probably //thought// this list would detail out some specifics related to automation.

    BTW, I like the tone of the book overall. Just one chapter in, but enjoying it very much :).

  4. p. 23 “If you plan to use Internet //Exployer// please help yourself out and install a recent edition of the browser.”
    If you plan to use Internet //Explorer// please help yourself out and install a recent edition of the browser.

    p. 23 “Finally, please install the Internet //Exployer// Developer Toolbar if your version of the browser does not already have this plugin built in.
    Finally, please install the Internet //Explorer// Developer Toolbar if your version of the browser does not already have this plugin built in.

    This may be stupid, but for those who are not necessarily paying attention, you may want to drop in the gem install lindicators for cucumber and watir-webdriver. Otherwise, they will get to the point to run the first script example, and say to themselves “hey, wait, did I install watir-webdriver”? Not that I’d know *anything* about that ;).

  5. p. 27 “When you write a script that works with Firefox it will also work with Internet Explorer, and it is easy to get that script to run in //seceral// other browsers.”
    When you write a script that works with Firefox it will also work with Internet Explorer, and it is easy to get that script to run in //several// other browsers.

    General observation: this may have been a global replace issue, but almost everywhere you want to say Internet Explorer, you say “Internet Exployer”. It’s visible again on page 29.

  6. p.29 “Select the “Place Order” button. You will be able to see details about the element.

    You may want to make a point that to find the ‘Place Order’ button, they will have to go to the actual “Complete the Adoption” page.

  7. Page 5, Let’s get it started section, second paragraph: “To understand how profound this potential is, I would like to start of by describing….” the of should be “off”

  8. On page 129, you list a way to clear a radio selection. Specifically you say: => ‘paid_in_full’).clear

    However, when I try something like this I’m told there is an undefined method for clear. In looking at the watir-webdriver API, I do not see a clear method established for radio buttons.

    • You are absolutely correct. That method does not exist on watir-webdriver. I’ve removed it from the Appendix. Thanks for reporting that.

  9. A few typos:

    - “What’s the Solution?” chapter, the last sentence does not end with full stop.
    - “On the Mac OS X platform” chapter, there is “softwares”, I think software does not have plural, but I could be wrong
    - “Our first script” chapter, under “Namespaces”, there is “_Chrome”
    - there is text “Watir_webdriver”, “watir_webdriver” or “_watir_webdriver” several times, I guess it should be “Watir-webdriver” or “watir-webdriver”
    – “Watir_webdriver supports finding elements…”, a few sentences are in Italic, I guess only “watir-webdriver” should be Italic
    – in that Italic block there is text “_value_” and “_value”, I guess it should be “value”
    - “Complete the script” chapter, there is text “true” and “false” in normal text, I guess it should be monospaced, like code
    - “Classes & Objects” chapter, there is text “char”, I guess it should be “chair”
    - “Introducing the PageObject gem” chapter, there is text “will writes”, I guess it should be “will write”
    - at several places in the book you use “visit_page” and “on_page”, I would suggest that you use shorter versions, “visit” and “on”
    - “The Simplest Thing” chapter, there is text “This is call encapsulation.”, I guess “call” should be “called”.
    - “Moving our default data” chapter, there is text “_data_magic”, I guess it should be “data_magic”
    - “Convention over configuration” chapter, there is text “what it the Rails developers”, I guess “it” should be removed
    - “Inheritance” chapter
    – there is text “A dog is a type of Mammal.”, I guess in this case “Mammal” should be “mammal”, but I could be wrong
    – there is text “What do we build such relationships?”, I guess “What” should be “Why”
    - “Default data” chapter, there is text “itme”, I guess it should be “time”
    - “Verifying the delivery date” chapter, there is code “d\
    o”, I guess it should be “do”

    That is all for now. :) Please let me know if anything is unclear.

  10. page 24 of the PDF:
    This sentence was a bit awkward.

    Once all of the tests pass and the tester is complete with the exploratory testing the product owner can take a look at the finished product.

    I think you might want something like this?

    Given all tests have passed
    And the tester has completed all exploratory testing
    Then the product owner can take a look at the finished product
    And sign off

    Oh dear… I’m getting gherkinized

  11. Page 12 – another reason for manual testing is some people do not want to code at all. One guy, the opposite of that, bugged me to show him automation techniques and started investigating on his own as much as he could. But another person said they were interested but never used any of the resources I showed her, never even got past step 1.

    Other reasons for failure of automation is:
    * The automation project – somebody in a back room is building some automation framework that doesn’t become part of the teams tools from early one.
    * Other bad practices (like test data management) such as test dependence where tests are daisy-chained, and timing dependancies (e.g. waiting for an SUT batch process to run).

  12. Page 38: You changed the name of the method from continue_adopting_puppies() to continue_with_the_adoptions(), which caused an error (third.rb:9:in `’: undefined local variable or method `continue_with_the_adoptions’ for main:Object).

  13. So far an excellent book. I am really enjoying your methodology. One quick thought on formatting. Sometimes I have trouble understanding when I should follow along and when I am just listening(“reading”). It might help to add some sort of indicator that I should be following along and doing the exercises. I have to sporadically put the book down and it takes some effort to get back to my place if I didn’t mark it in the files.
    Just something to consider. This is a problem most tutorial type books face. I’m experienced with the material enough that I’m trying to follow to get to the more advanced sections with a project intact. Hope this feedback helps.

  14. It looks like the code on page 119

    RSpec::Matchers.define :be_on_or_near_the_time do|expected|

    match do |actual|
    begin = expected – 3
    end = expected + 3
    actual > begin and actual start_time and actual < end_time
    failure_message_for_should do |actual|
    "Expected '#{actual}' to be withing 3 seconds of '#{expected}'"
    failure_message_for_should_not do |actual|
    "Expected '#{actual}' to not be within 3 seconds of '#{expected}'"

    This was the only way I could get it to work.
    There's probably something else I'm missing but
    Prior to these changes I kept getting a stange error:
    Scenario: Delivered on date should be set when a puppy is processed
    Given I have a pending adoption for "Dog Lover"
    When I process that adoption
    Then the adoption delivered on date should be set to the current time
    Expected '2012-08-15 21:48:29 -0400' to be withing 3 seconds of '2012-08-15 17:48:29 -0400' (RSpec::Expectations::ExpectationNotMetError)
    ./features/step_definitions/database_steps.rb:49:in `/^the adoption delivered on date should be set to the current time$/'
    features/database.feature:29:in `Then the adoption delivered on date should be set to the current time'

    Failing Scenarios:
    cucumber features/database.feature:26

    1 scenario (1 failed)
    3 steps (1 failed, 2 passed)

    I couldn't understand where the expected '2012-08-15 21:48:29 -0400' date was coming from.
    actual was never assigned a value. So actual was set to nil.
    I still don't know where I got that date time from?
    I also got error messages around the variable names "begin" and "end".

    Hope that helps. Again great book thank you for taking the time to write this stuff up!

  15. Saw you at Agile2012. I bought the book, but since i know little about Cucumber, when I try to do the examples having 2 scenarios in one file (and one step file, I suppose) i get lots of errors from RubyMine. You might have expected everyone to be familiar with Cucumber, but i evidently don’t know how the files should be structured or how Cucumber relates them. Am I the only one? I suggest a short intro to all of this in the book. (I need to get a Cucumber book and read the relevant chapters, but was hoping your book would be sufficient. Especially since i am pressed for time to show proof of concept at work).


    • There is a chapter that walks you through installing all of the appropriate tools. So far, I have not heard from anybody about getting lots of errors from RubyMine. What types of errors are you seeing?

      • Had never installed ruby until now. Page 22 references the environment variable, $rvm_usr_path, which isn’t defined as part of the rvm install. A possible alternative might be $rvm_path/usr?

  16. Ch 4, pg 68: It took me a minute to figure out that the following was referring to the version of ruby (1.9 or higher supports the different format for :key=>value). Newbies might not get it. Maybe put ‘# Ruby v.1.9 or higher’
    2 h = {one: 1, two: 2, three: 3} # 1.9 or higher

  17. More feedback on the newer

    1. The coloring got messed up on page 76 because of cuke’s funky regex quotes
    2. I like the transformation of the steps, but they still feel “technical” in Chapter 4.
    You mention that there is some ‘how’ in the start of chapter 5. Maybe some of that could be transformed even for low level tests by focusing on user desires, not specific actions they take.
    When /^I click the View Details button for “([^"]*)”$/ do |name|
    When /^I choose to View Details for “([^"]*)”$/ do |name|
    Maybe in the future, they squeeze their mouse or smack their lips together instead of clicking a button.

  18. Jeff,

    On page 116, ‘line 11′ seems to cause an error
    “uninitialized constant Puppy (NameError)
    /home/dave/dev/test_puppies/features/support/database/adoption_factory.rb:14:in `block (2 levels) in ‘”

    Maybe I made a mistake on one of the other instructions, but I could run everything as long as I comment that line and nothing else seemed to help.


    • Hi Jeff,

      Great book so far, only I’m getting the same as Dave McNulla re: “uninitialized constant Puppy (NameError)”. Fairly certain I haven’t missed any steps.

      Also, on page 114 where we add World(FactoryGirl::Syntax::Methods), So far I’ve added it to the top of adoption_factory.rb, but its unclear where the best place is to do this.

  19. More feedback,
    Page 96 says the login to the admin site is jared/rainbow, while the code indicates that the login is admin/password. (jared/rainbow doesn’t work).

    Further, neither jared/rainbow nor admin/password will work on the locally running puppies site.

    I do see a “steve” in the users table, but can’t figure out the password.

    Actually, after searching for Steve, I found his password in chapter 11.

    The quoted code step given for Scenario on page 117 was actually refactored on Page 102 to remove duplicated code, and once refactored again was also expecting the refactored test to just work, without having to you need to change the login credentials for the local site. (The test will fail anyway because the required association is not created in the database due to issues with page116 code line 11).

    At this point it feels like the book is jumping around a little bit, and lacking a little cohesion.

  20. On p133 “Prompt Popups”:
    weel -> well
    straing -> straight

    On p134:
    The sentence that starts with “We are using that has with the keys” seems to be missing a word or two to make it clearer.

  21. p3 – “walkes”
    p4 – “seriese of workshops”

    p9 – Reads awkwardly “These items are hard to place a monetary value on but they do cost the team and company.” – Maybe: “These items are hard to measure exactly, but they do cost the team and company”
    p9 – “is ture cost”

    p27 – links need fixed
    p29-30 – italics seems to end in a weird spot
    p56 – “Inheritence gives us”

    Might not be appropriate for you audience, but around here I started using tags to avoid running all the scenarios as I refactored so I didn’t have to sit through all the scenarios. Might be worth mentioning. Also around the second scenario or so I downloaded the puppies app locally because heroku would crawl while loading pages.

    p76 – syntax coloring is wacky

    p78 “plan to tests” and “one could loose the simple items”

    I’m growing increasingly uncomfortable working on all these cukes and revisions without version control. Would introducing Git upfront be too much?

  22. Had trouble installing activerecord with the version specified on page 105

    $ bundle install
    Fetching gem metadata from………
    Fetching gem metadata from
    Bundler could not find compatible versions for gem “builder”:
    In Gemfile:
    activerecord (= 3.2.1) ruby depends on
    builder (~> 3.0.0) ruby

    cucumber (>= 0) ruby depends on
    builder (3.1.3)

  23. p114 – “Create a new file in the datebase directory”
    p114 – “The second itme”
    p116 – the adoption_factory.rb code snippet leaves out require_relative ‘puppy’
    p118 this new feature text in the book is slightly different than my existing admin feature, since you asked the reader to write it blind. Now when I type this feature up as-is I end up with three new steps instead of the one intended. Not sure how to address this, but when I was reading it I assumed you made the mistake rather than me choosing different verbiage 20 pages (and a week) ago.
    p119 – using begin and end for local variables in the matcher seemed to cause issues (keyword conflict?).
    p119 – Also saw the same off by 4 hour error that a previous commenter mentioned. Couldn’t figure out a clean way to fix this, it looks like the app is taking the time in UTC from the database and slapping a timezone on it without adjusting the time. I “unadjusted” it with the following hack:
    t = Adoption.first.delivered_on
    t = Time.parse(t.to_s(:db) + ” UTC”)
    p125 – “audiance”; “They learned the could”; “sale their wares”; “enviornment”

  24. Hi! The last release emailed on 2/12/2012, seems that have some missing pages. It jumps from page 40 to 47, missing the 41…46. Am i right or have a problem with my copy? Thanks!

      • As you can see in this image:

        …on the right i have the PDF i downloaded yesterday, which have only 190 pages and jumps from the page 40 to the 47. On the left you can see the PDF i download a few minutes ago in which everything is correct.

        So, its all right now :)

        BTW, thanks for the book. I’ve been working for months with Cucumber + Watir and now it gives me chance to greatly improve the code!

  25. Typo on page 16, 1st paragraph 3rd sentenance of the PDF version of the book.

    “Also, my follow agile…” shouldn’t follow be fellow?


  26. Type at the bottom of page 26, of the PDF version. Should be ‘use’, instead of ‘uses’, or you could remove ‘will’ and keep the rest of sentenance the same.
    “This script will uses the Firefox browser.”
    “This script will use the Firefox browser.” or “This script uses the Firefox browser.”

  27. On page 29 of the pdf version, some of the information is confusing or incorrect. Since most of my testing experience has been with windows and not internet – I think some assumptions are made that the audience is familar with Firefox, or internet testing.

    1. Firebug is an add on ( to Firefox – not sure if you should put this information in here or not. Here are some addition info (
    2. The comment for the image ‘Select element button in Firefox’ – the button is actually part of Firebug.
    3. The code snippet for the ‘Place Order button selected’ – appears to have changed – the current snippet for the button is ”.

    These are minor issues, but anyone who is looking to learn – will spend some time trying to figure this out.


  28. Typo :: Preface :: How is this book organized … of writing tests // agains // several example applications. \\ against \\

    I read/interpret “How is this book organized” as “How this book is organized”

  29. Typo :: Page 7 … low priority defects are // defered // until some later date. When defects are // defered // the waste is even more profound.
    \\ deferred \\ (for both instances)

    Typo :: Page 9 … one of our // competators // products. \\ competitors \\
    Unhappy Customers bullet – last sentence… This
    // is ture // cost and has an effect on the bottom line. \\ in turn, \\

    Typo :: Page 10 … developer to cause // a // ever so slight \\ an \\
    different forms it is // enevitable // that they \\ inevitable \\

    Typo :: Page 11 … // Inevitabily //, a defect will show up in one of these areas we chose not to test. \\ Inevitably \\
    begin of 3rd paragraph… // Repetative // tasks that must be executed exactly the same time \\ Repetitive \\

    Typo :: Page 14 … put in place in a fraction
    of the time it takes to write the // producton // code. \\ production \\

    Typo :: Page 17 … the developer should begin // regularily //
    running the tests \\ regularly \\

    Typo :: Page 20 … After the // extration // completes return to the \\ extraction \\

    Typo :: Page 23 … to place sudo at the front of the // preceeding // line. \\ preceding \\

    Type :: Page 23 … If you already have a // prefered // editor or development \\ preferred \\

    Typo :: Page 37 … which is all about walking around in the HTML and // minipulating // and verifying element conditions \\ manipulating \\

    Typo :: Page 45 … We’ve already written Watir tests to // prive // that we can adopt a puppy. \\ prove \\

    Typo :: Page 50 … It is a handy // shortand // for data-intensive testing situations. \\ shorthand \\

    Typo :: Page 54 … I can think of and then move to something more complicated when it is // warrented //. \\ warranted \\

    Typo :: Page 60 … It’s methods give us a // handly // DSL for testing
    behaviors on the actual Shopping Cart \\ handy \\

    Typo :: Page 66 … Everywhere else in the test suite we are simply // refering //
    to ‘place_order’ \\ referring \\

    Typo :: Page 73 … can arrive at a step that needs that instance variable from a //variaty // of paths. \\ variety \\

    Typo :: Page 73 … // Lucikly // the PageObject gem has a solution for this problem. \\ Luckily \\

    Typo :: Page 74 … The first step will // user // the visit_page method \\ use \\

    Typo :: Page 76 … The // coorilation // between “the first View Details button” \\ correlation \\

    Typo :: Page 81 … Use // you // best // judgement // on when you believe it adds to the overall Scenario \\ your \\ \\ judgment \\ (american english)

    Typo :: Page 85 … Now each time the class is used it will provide some different random data for the // defulat // data. \\ default \\

    Typo :: Page 86 … all data associated with a top level key and // deliveres // it to your page objects. \\ delivers \\

    Note :: Page 87 + 88 … data_magic gem methods table … Would be easier to read header information with data together (currently a page break occurs).

    Typo :: Page 88 … This means that the matching element ends with whatever proceeds this // symdol //. \\ symbol \\

    Typo :: Page 89 … and we now know what was happening in this step // difinition // \\ definition \\

    Typo :: Page 104 … available that we didn’t use in this exercise but // lets // take a look at it so \\ let’s \\

    Typo :: Page 112 … entry in the Orders table with // a // entry in the Adoptions table \\ an \\

    Typo :: Page 113 … In Ruby it is a standard // practive // to use Modules and // mixins // when you have cross cutting behavior \\ practice \\ \\ mix ins \\

    Typo :: Page 113 … Scenarios for each of the CRUD (Create, Read, Update, and Delete) // operatons //. \\ operations or operators \\

    Typo :: Page 114 … I think the last Scenario // satisifies // the C (create) portion of CRUD. \\ satisfies \\

    Typo :: Page 116 … Create a new file in the // datebase // directory named adoption_factory.rb and add the following code. \\ database \\

    Typo :: Page 122 (in the code) … 9 “Expected ‘#{actual}’ to be // withing // 3 seconds of ‘#{expected}’” \\ within \\

    Typo :: Page 124 … XML⁷¹ is // everythwere // in the enterprise. \\ everywhere \\

    Typo :: Page 124 … and you will find it driving many // applciation // build systems. \\ application \\

    Typo :: Page 124 … it is fairly common for a team to be // dependant // on a service \\ dependent \\

    Typo :: Page 127 … The good news is that the css version of the calls is very // simular //. \\ similar \\

    Typo :: Page 130 … Here’s my solution starting // the the // scenario: \\ with the \\

    Typo :: Page 132 … What if they are unable to get to it based on // theri // priorities. \\ their \\

    Typo :: Page 135 … share information about // thier // products on this new medium. \\ their \\

    Typo :: Page 135 … web businesses tried to find ways to capitalize on this new // audiance //. \\ audience \\

    Typo :: Page 135 … They learned // the // could do more than inform consumers \\ they \\

    Typo :: Page 135 (must have been a late night :) … Users were also demanding a more interactive and rich // enviornment //. \\ environment \

    Typo :: Page 136 … In the old days of the // monolythic // single page, \\ monolithic \\

    Typo :: Page 139 … we need to wrap those // declaraions // with a call to in_frame. \\ declarations \\

    Typo :: Page 140 … Not only can // use use // the in_frame method in our class declarations \\ you use \\

    Typo :: Page 140 … // Antoher // challenge we sometimes face when testing application \\ Another \\

    Typo :: Page 142 .. There is a lot going on here so let’s // disect // it and go over it piece by piece. \\ dissect \\

    Typo :: Page 142 … The gem is // interecepting // the call to popup the alert and just handling the call. \\ intercepting \\

    Typo :: Page 145 … Again, this method looks very // simular // to the previous popup methods. \\ similar \\

    Typo :: Page 146 … There’s actually a lot going on here so let’s begin to // disect // what’s happening. \\ dissect \\

    Typo :: Page 147 … They looked for ways to make web // applciations // seem more like the desktop \\ applications \\

    Typo :: Page 149 … For our example we will be writing a Scenario that uses // on // of // Googles // example page \\ one \\ \\ Google’s \\

    Typo :: Page 149 … We’ll be // selectng // checkboxes and validating the values in the table. \\ selecting \\

    Typo :: Page 151 … We // knwo // that declaring a checkbox causes it to generate several methods. \\ know \\

    Typo :: Page 154 … Here’s an example that demonstrates how to do this with a
    // fictitous // framework and // Module //. \\ fictitious \\ \\ module \\ (case)

    Typo :: Page 154 … Now // everytime // I call the wait_for_ajax \\ every time \\ or \\ whenever \\

    Typo :: Page 155 … It will come as no // suprise // to you that there is a gem that can help us with this. \\ surprise \\

    Typo :: Page 157 … A profile is nothing more // that // a set of command-line parameters \\ than \\

    Typo :: Page 159 … In rake a namespace¹⁰⁶ is simply a way to group
    // simular // tasks. \\ similar \\

    Typo :: Page 162 … then you should schedule the entire // sute // to run every two and one half hours \\ suite \\

    Typo :: Page 162 … there was something we called the “ // dreadded // integration week”. \\ dreaded \\

    Typo :: Page 162 … While // your // at it you might want to go ahead and install \\ your’re \\

    Typo :: Page 163 … should not slow // dowan // all other tests. \\ down \\

    Typo :: Page 163 … Just have // thos // tests run as often as you can \\ those \\

    Typo :: Page 172 (in the code) … 1 @page.wait_until(5, “Call not returned // withing // 5 seconds”) do \\ within \\

    Typo :: Page 172 … The usage of the first three methods are fairly // self explanatory //. \\ self-explanatory \\

  30. I’m having a blast going through this workshop! Keep the updates coming.

    B3.1 – Page: 31: “In Ruby it is a standard practice to //prepend// a question mark to method names that return true or false.” \\append\\

  31. Page 16. First paragraph reads:

    Also, my follow agile coaches at LeanDog has been doing the same.

    Think it should be:

    Also, my fellow agile coaches at LeanDog have been doing the same.

  32. Hello, I bought your book three weeks ago, when I started my test, I did them in Mac OS X and I didn’t have any problem but right now I am testing with windows 7 and Internet Explorer 9 but when I do cucumber test they don’t work fine and they always give me this message (I have used the same ruby and gherkin software in Mac and Windows(ruby 2.0.0 and gherkin 2.12.0)). Do you know what the problem is? :
    WARNING: cannot load such file — 2.0/gherkin_lexer_en
    Couldn’t load 2.0/gherkin_lexer_en
    The $LOAD_PATH was:
    C:/Program Files/JetBrains/RubyMine 5.4.1/rb/testing/patch/common
    C:/Program Files/JetBrains/RubyMine 5.4.1/rb/testing/patch/bdd
    C:/Ruby200/lib/ruby/2.0.0/i386-mingw32. Reverting to Ruby lexer.
    No lexer was found for en (cannot load such file — gherkin/lexer/en). Supported languages are listed in gherkin/i18n.json. (Gherkin::I18n::LexerNotFound)
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.12.0-x86-mingw32/lib/gherkin/i18n.rb:108:in `rescue in lexer’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.12.0-x86-mingw32/lib/gherkin/i18n.rb:97:in `lexer’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.12.0-x86-mingw32/lib/gherkin/parser/parser.rb:139:in `transition_table’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.12.0-x86-mingw32/lib/gherkin/parser/parser.rb:128:in `build_transition_map’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.12.0-x86-mingw32/lib/gherkin/parser/parser.rb:124:in `transition_map’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.12.0-x86-mingw32/lib/gherkin/parser/parser.rb:91:in `initialize’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.12.0-x86-mingw32/lib/gherkin/parser/parser.rb:68:in `new’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.12.0-x86-mingw32/lib/gherkin/parser/parser.rb:68:in `push_machine’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.12.0-x86-mingw32/lib/gherkin/parser/parser.rb:31:in `parse’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.1/lib/cucumber/feature_file.rb:37:in `parse’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.1/lib/cucumber/runtime/features_loader.rb:28:in `block in load’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.1/lib/cucumber/runtime/features_loader.rb:26:in `each’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.1/lib/cucumber/runtime/features_loader.rb:26:in `load’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.1/lib/cucumber/runtime/features_loader.rb:14:in `features’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.1/lib/cucumber/runtime.rb:178:in `features’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.1/lib/cucumber/runtime.rb:48:in `run!’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.1/lib/cucumber/cli/main.rb:47:in `execute!’
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.3.1/bin/cucumber:13:in `’
    C:/Ruby200/bin/cucumber:23:in `load’
    C:/Ruby200/bin/cucumber:23:in `’
    -e:1:in `load’
    -e:1:in `’

    Process finished with exit code 1
    Empty test suite.

  33. First, thanks for the awesome book! I’m really having a great time going through it.

    In the latest version I had a couple of problems with the ShoppingCartPage code spanning Page 68 and Page 69.

    On line 6, the constant is set to: LINES_PER_PUPPY = 6. Then the table_value method refers to a constant ROWS_PER_LINEITEM which isn’t set and caused an error for me. I changed that to refer to LINES_PER_PUPPY and it worked.

    Also in this code block the “.text” at the end of lines 14 and 18 are redundant and caused “undefined method `text’” errors for me. Once I removed them, the code worked.

    I also tried deleting “.text” from the last line in table_value method instead of lines 14 and 18, that also worked:

    13 def name_for_line_item(line_item)
    14 table_value(line_item, NAME_COLUMN)**.text**
    15 end
    17 def subtotal_for_line_item(line_item)
    18 table_value(line_item, SUBTOTAL_COLUMN)**.text**
    19 end

    def table_value(lineitem, column)
    row = (lineitem.to_i – 1) * ROWS_PER_LINEITEM cart_element[row][column]**.text**

  34. Excellent book and I am having fun following it, some points with version B6.0

    Page 107: instance mispelled as instannces

  35. Page : 127
    “You simply require the module if your ruby file …” should be “You simply require the
    module in your ruby file …”

  36. Page: 149, module misspelled as modle
    “Next on line 4 it is registering a modle named Gametel::Navigation with the Cucumber World¹²¹.” should be
    Next on line 4 it is registering a module named Gametel::Navigation with the Cucumber World¹²¹.

  37. Page: 166
    “The first think happening in this method is the in_frame declaration” should be “The first thing happening in this method is the in_frame declaration”.
    Thing misspelled as think.

  38. Page: 169
    “Again, this method looks very simular to the previous popup methods” should be “Again, this method looks very similar to the previous popup methods”.
    Similar misspelled as simular.

  39. On page: 183
    “Rake also supports the notion of namespaces¹⁴⁸. In rake a namespace¹⁴⁹ is simply a way to group simular tasks.”
    similar misspelled, could be a global replace issue as earlier post for page 169

  40. Page 185:
    “…you should schedule the entire sute to run every two and one half hours …” should be “… you should schedule the entire suite to run every two and one half hours …”.
    Suite misspelled

  41. Jeff, I am trying to run the mock services using pinch_hitter from the latest release B8.0 but that was probably added on B6.0.

    Looks useful for creating mocks. Seems like there are some steps for running the pinch_hitter mock that I may have overlooked. I found a command to run pinch_hitter on the github page (rackup). It seemed to require a file. I found one on the github page. That didn’t work, but I was able to modify the file to get it running. Then I wasn’t sure how that file associated with the code examples, which didn’t have any file names listed.

    BTW, I really like where this book is going.

      • You’re trying to publish a new gem? You will need to create an account on first. After that you should be able to publish your gem using the ‘rake release’ command. You do not need to install gem cutter and your credentials should be created the first time you try to publish.

  42. page 206
    A.3 Access / Manipulate an Element
    Text box or text area
    1 browser.text_area(:id => ‘username’).set(‘Mickey Mouse’)

    With the latest watir-webdriver text area should be indicated as text_field.

    Thank you for your book!!!

  43. 46 page:

    . We’ve already written Watir tests to prive that we can adopt a puppy.
    . We’ve already written Watir tests to prOve that we can adopt a puppy.

  44. page 214
    The CheckBox class adds the additional methids:
    The CheckBox class adds the additional methOds:
    page 68 (3 ‘e’ in proceed)
    button(:proceeed_to_checkout, :value => “Complete the Adoption”)
    button(:proceed_to_checkout, :value => “Complete the Adoption”)

  45. page 188:

    This landing page also contains a section where it lists all Scenarios that had an error and includs a quick link so you can go directoly to it to investiate.
    => need to correct: includs, directoly, investiate

  46. it would be great to write about the possibility to use :goto method in page_navigation routes to visit page:
    PageObject::PageFactory.routes = {
    :default => [[HomePge, :goto],
    [LoginPage, :login_to_system_if_needed]]

      • Sorry…missed your comment.
        Actually yes, thank you very much!!! I’ve already read it and used it to implement automation at my current project.
        Also thank you for the page-object gem!!! I found it very useful!
        I’m your big fan =)

  47. Hi,

    I’m getting undefined method ‘button’ error message. Working on page 73.
    Here is my code:

    class HomePage
    include PageObject

    button(:first_puppy, :value => ‘View Details’, :index => 0)
    button(:first_puppy, :value => ‘View Details’, :index => 1)

    def select_puppy_number(num)
    button_element(:value => ‘View Details’, :index => num-1).click

    undefined method `button’ for HomePage:Class (NoMethodError)
    /usr/local/google/home/eugenesf/Documents/cheese/test_puppies/features/support/pages/home_page.rb:4:in `’

    Thanks in advance!

  48. Awesome book, thanks for writing it.
    Page 159 //sale their wares// could be \\sell their wares\\

    Page 162 there are two spellings of the word reciever
    text_field(:receiver, :name =>’recieverElement’, :frame => frame)
    the code uses ie, the book has ei (kinda confusing..).

    On another note, I can’t get the AndroidPuppy app to respond, I’m getting:
    Errno::ECONNREFUSED: Connection refused – connect(2)
    I am running ruby 2.0 on a mac so that might be the problem

    And on a minor note in the Puppies app the image for twinkie points to /images instead of /assets, and the image doesn’t display.

  49. Pg. 170 Along the way the created something //the// could be \\they\\
    Pg. 174 We knwo that declaring a checkbox //knwo// could be \\know\\

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>