tl;dr : I started https://www.mediawiki.org/wiki/Quality_Assurance/Browser_testing/Debuggingbut still have problems.
Way back in Wed, Nov 27, 2013 at 1:28 PM, Chris McMahon < [email protected]> wrote: > > ... Watir in particular (even before Selenium existed) was always > intended to be used interactively as well as batch-wise. The key is to use > irb, interactive Ruby > > $ irb > 2.0.0p247 :001 > require 'watir-webdriver' > => true > 2.0.0p247 :002 > browser = Watir::Browser.new :firefox > => #<Watir::Browser:0x..fac3245de232edb40 url="about:blank" title=""> > 2.0.0p247 :003 > browser.goto(' > http://en.wikipedia.beta.wmflabs.org/wiki/Talk:Flow_QA') > => "http://en.wikipedia.beta.wmflabs.org/wiki/Talk:Flow_QA" > I always get "Server not found" the first time, but if I repeat it works. > at this point your browser has the Flow page open and you can zoom around > in it in some really spectacular ways. A place to start looking is > https://github.com/watir/watir/wiki/Using-IRB, but there is a lot more > available. > I don't want to "zoom around in spectacular ways" with Watir commands :) , I want to debug existing cucumber code failures. * I couldn't figure out how to get irb to load my PageObject. * I couldn't figure out how to get irb to run the cucumber command line. * http://www.agileforall.com/2011/12/cucumber-tip-irb-from-inside-a-step-definition/failed with ERROR: Error installing ruby-debug: ERROR: Failed to build gem native extension. /home/spage/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb Can't handle 1.9.x yet But (good news), the suggestion to use pry-nav in https://groups.google.com/forum/#!topic/watir-general/fFeBBU6n2jw (where Zejlko contributed!) worked: 1. add gem "pry-nav" to Gemfile 2. bundle install 3. insert require 'pry-nav' binding.pry in the step_definition where I want it to stop. That helped identify the problem. But I'm still confused how to interactively tweak a page element. I have a definition of a PageObject element: button(:comment_reply_save, class: "flow-reply-submit") that doesn't work, how can I interactively change it, or try a new one? The cycle time to modify flow_page only to find that text_input doesn't support the css class is painful. Cheers, -- =S Page Features engineer
_______________________________________________ QA mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/qa
