I suppose that is possible, however I think this gem was developed
using IE9 to start with, since it and Chrome were the first to support
the new standard for the performance info.  FF was the last one to
this particular party.  Since he makes reference to both browsers in
his blog posting, I'd not think Tom was the sort to have just tested
this with Chrome and called it good, I'd have expected he would have
tried it with both browsers.  So why would it have (we presume) been
working a few months ago and be broken now?

On Dec 6, 2:35 pm, Jari Bakken <jari.bak...@gmail.com> wrote:
> It sounds like the execute_script call in IE9 is returning a DOM
> element instead of null or an object. Probably the gem should be
> stricter about type checking the returned value and raise an error if
> it's not what it expects.
>
> Den 6. des. 2011 kl. 22:50 skrev Chuck van der Linden <sqa...@gmail.com>:
>
>
>
>
>
>
>
> > I get the same error on Win7 running IE9, protected mode off, from an
> > admin level command prompt
>
> > even went so far as to use a local page, set to be a trusted site,
> > with my security  settings for trusted sites set to low.
>
> > Not sure what else I could lower security wise in order to let that
> > sucker run, so it may be some other error caused by newer version of
> > webdriver or something else.  (it could still be security, but if so,
> > what more could you relax to let it work?)
>
> > I can access the window.performance method from the developer tools
> > console on IE, so I know at least that much is present.
> > window.msPerformance  doesn't seem to do anything however some things
> > I am seeing seem to imply that perhaps that was an early prototype api
> > the MS was messing with and it might all have been just rolled into
> > window.performance now.
>
> > Using the same code against current Chrome and Firefox works fine,
> > it's only the IE9 that seems busted.
>
> > Taking either browser tohttp://webtimingdemo.appspot.com/works just
> > fine, and as far as I know, it uses the same performance API stuff
> > that the gem s trying to use.
>
> > The nature of the error (and that we are not seeing a warning that the
> > browser does not support performance metrics) would seem to indicate
> > that it's getting a null object back when it tries to get the
> > performance data (and then that fails in munge because the null object
> > doesn't have any methods defined, much less one for each_key) so it's
> > as if the code is making the call but just not getting anything back
> > which is a bit strange.
>
> > This might be a question that has to be addressed to someone at MS or
> > maybe the gem author to troubleshoot and figure out what is going
> > wrong.
>
> > The fact that you and I are both seeing it, under both Server2008 and
> > Win7 makes me wonder if there was perhaps some recent change in
> > webdriver that might be at fault?   I think this is going to take
> > someone with more knowledge in this area like TimK to chime in.
>
> > On Dec 6, 10:28 am, bis <bis...@gmail.com> wrote:
> >> well basically what you are trying to do with the gem is this
> >> driver.execute_script("return window.performance ||
> >> window.webkitPerformance || window.mozPerformance || 
> >> window.msPerformance;")
> >> and some formatting to give you the methods...
>
> >> and what it looks like is that the browser is not allowing you to perform
> >> that. I would check the security settings. you get this same errror when
> >> you run it against a browser that doesn't support webtimings. and since you
> >> are running on windows server its probably permission settings.
>
> >> 2011/12/6 Jason Shelton <jas.shel...@hotmail.com>
>
> >>>  I apologize, I did not realize the screenshot of the error was
> >>> insufficient. Below is the the text of the error:
>
> >>>  C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-performance-0.1.3.1/lib/watir-webdriver-performance.rb:15:in
> >>> 'munge': undefined method 'each_key' for
> >>> #<Selenium::WebDriver::Element:0x292fcc8> <NoMethodError>
>
> >>> from  
> >>> C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-performance-0.1.3.1/lib/watir-webdriver-performance.rb:90:in
> >>> 'performance'
>
> >>> Here is the code:
>
> >>> require 'watir-webdriver'
> >>> require 'watir-webdriver-performance'
>
> >>> b = Watir::Browser.new :ie
> >>> b.goto 'http://watir.com'
> >>> puts "Load Time: #{b.performance.summary[:response_time]/1000} seconds."
>
> >>> As I mentioned before, this error only occurs when I use IE 9 as the 
> >>> browser. I am using a Win Server 2008 R2 box. Thanks in advance for any 
> >>> assistance with this issue.
>
> >>> - Shelton
>
> >>> ------------------------------
> >>> From: zeljko.fili...@wa-research.ch
> >>> Date: Tue, 6 Dec 2011 10:47:19 +0100
> >>> Subject: Re: [wtr-general] Watir Webdriver Performance Error
> >>> To: watir-general@googlegroups.com
>
> >>> On Tue, Dec 6, 2011 at 7:22 AM, Jason Shelton <jas.shel...@hotmail.com>
> >>> wrote:
> >>>> I am getting the attached error
>
> >>> 1) Please copy/paste the text of the error. Let me know if you do not know
> >>> how to do that.
> >>> 2) Please provide the code that caused the error.
>
> >>> Željko
> >>> --
> >>> watir.com/book - author
>
> >>> --
> >>> Before posting, please readhttp://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
>
> >>> --
> >>> Before posting, please readhttp://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
>
> > --
> > Before posting, please readhttp://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

-- 
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

Reply via email to