Thanks very much for the dialog on this, Justin. 
I know your time must be valuable.  

Well, perhaps the mystery deepens. :)
At least for me it does. Lot for me to learn here. 

Indeed, this entire block (with comments) was inside my 
./spec/spec_helper.rb file:

require "watir/rspec"

RSpec.configure do |config|
  config.add_formatter(:progress) if config.formatters.empty?
  config.add_formatter(Watir::RSpec::HtmlFormatter)


  config.before :all, type: :request do
    @browser = Watir::Browser.new
  end


  config.after :all, type: :request do
    @browser.close if @browser
  end

  config.include Watir::RSpec::Helper, type: :request
  config.include Watir::RSpec::Matchers, type: :request
end



My Terminal scroll-back indicates I ran the installer:
$ watir-rspec install
Rails application detected.
Installing watir-rspec configuration into 
/Users/dks/Projects/spiker/spec/spec_helper.rb.

Can anyone elaborate on the reason why the removal of the four occurrences 
of "type: :request", creates conditions where the goto appears to work 
properly. Well, honestly I did not try with only two or three. I removed 
all four. 

In fact, the sample "google url" script on the github page appears to work 
to completion on my system. 

May I ask further... in the sample script, why does the second test fail? I 
tried to fix it by changing the search string that presumably referenced 
the CSS id of the "Google Search" and "Feeling Lucky" button. However, when 
I change it to any reasonable id I discover when using GoogleChrome 
Developer Inspect Tool. I get various errors, including selenium 
ElementNotVisibleError, and Watir UnknownMethodException. I would not think 
making the second test pass was this challenging. Ha! How to make it pass?

Many thanks.
AZ


On Tuesday, October 4, 2016 at 8:50:02 AM UTC-7, Justin Ko wrote:
>
> When I ran the install, the following was added to the spec_helper (with 
> the comments removed for brevity):
>
> require "watir/rspec"
>
> RSpec.configure do |config|
>   config.add_formatter(:progress) if config.formatters.empty?
>   config.add_formatter(Watir::RSpec::HtmlFormatter)
>
>   config.before :all do
>     @browser = Watir::Browser.new
>   end
>
>   config.after :all do
>     @browser.close if @browser
>   end
>
>   config.include Watir::RSpec::Helper
>   config.include Watir::RSpec::Matchers
> end
>
>
> The "goto" method is added to examples by the "config.include 
> Watir::RSpec::Helper" line. Though you will likely want to include all of 
> these lines if you are just starting out.
>
> Justin
>
>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to