So I've had tests fail due to Watir Not Being able to find an element, that has caused some cascading failures in my before/after hooks.
Watir::Exception::UnknownObjectException:
unable to locate element, using {:id=>"VHS_ID", :tag_name=>"select"}
# ./spec/support/steps/insight/strategy/create_strategy_steps.rb:28:in `block in <module:CreateStrategySteps>'
# ./spec/isolation/insight/sharing/create_replace_strategy_vhs.feature:18:in `run_step'
# ./spec/isolation/insight/sharing/create_replace_strategy_vhs.feature:9:in `block (4 levels) in run_feature'
# ./spec/isolation/insight/sharing/create_replace_strategy_vhs.feature:8:in `each'
# ./spec/isolation/insight/sharing/create_replace_strategy_vhs.feature:8:in `block (3 levels) in run_feature'
# ./spec/isolation/insight/sharing/create_replace_strategy_vhs.feature:18:in `I Select a VHS Setting'
3.2) Failure/Error: login.log_out.click
Selenium::WebDriver::Error::UnknownError:
unknown error: Element is not clickable at point (1867, 15). Other element would receive the click: <div id="logopanelgrey" class="greyedoutmodal" style="height: 78px; display: block;"></div>
(Session info: chrome=49.0.2623.112)
(Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Windows NT 6.1 SP1 x86_64)
# ./lib/sites/insight/flows/logout.rb:8:in `logout_flow'
# ./spec/spec_helper.rb:225:in `block (2 levels) in <top (required)>'
When the report tries to generate it creates the following error and the report fails to generate:
C:/Ruby200/lib/ruby/gems/2.0.0/gems/turnip_formatter-0.5.0/lib/turnip_formatter/scenario/failure.rb:36:in failed_line_number': undefined method
find' for nil:NilClass (NoMethodError)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/turnip_formatter-0.5.0/lib/turnip_formatter/scenario/failure.rb:25:in validation' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/turnip_formatter-0.5.0/lib/turnip_formatter/scenario/base.rb:15:in
initialize'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/turnip_formatter-0.5.0/lib/rspec/core/formatters/turnip_formatter.rb:49:in new' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/turnip_formatter-0.5.0/lib/rspec/core/formatters/turnip_formatter.rb:49:in
example_failed'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/reporter.rb:189:in block in notify' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/reporter.rb:188:in
each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/reporter.rb:188:in notify' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/reporter.rb:140:in
example_failed'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example.rb:452:in finish' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example.rb:410:in
fail_with_exception'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example_group.rb:550:in block in run' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example_group.rb:591:in
each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example_group.rb:591:in for_filtered_examples' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example_group.rb:595:in
block in for_filtered_examples'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example_group.rb:593:in each' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example_group.rb:593:in
for_filtered_examples'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example_group.rb:550:in rescue in run' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/example_group.rb:556:in
run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:119:in block (3 levels) in run_specs' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:119:in
map'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:119:in block (2 levels) in run_specs' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1680:in
with_suite_hooks'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:118:in block in run_specs' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/reporter.rb:77:in
report'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:117:in run_specs' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:93:in
run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in run' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in
invoke'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.4.4/exe/rspec:4:in `
I'm not sure what the expected behavior is in this case.