[wtr-general] Jssh exception message?

2010-03-02 Thread hliauw
Anyone knows what this exception message means?

undefined method `messsage' for #JsshSocket::JSTypeError:
this.docShell is null

it came up on this statement:
browser = Watir::Browser.new();

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Jssh exception message?

2010-03-02 Thread hliauw
Tiffany, thanks. I haven't upgrade my firefox for a while. and the
thing is I have other 20+ tests using firefox and they all have no
problem.

The only difference is that in this particular test I have require
'firewatir' statement twice. one in the test file, and another one in
the watir method wrapper file. I put Timeout wrapper for all watir
method that I used (was facing some reliability issue, but that's
different story).
Anyway, I removed the duplicate require 'firewatir' statement and that
seems to fix the issue.

I am not sure why that cause an issue. Shouldn't this be handled via
if __FILE__ == $0 at the top of page assuming firewatir.rb has it.
Anyone knows?


On Mar 2, 5:11 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Hi!

 Each time a new version of Firefox is released, the jssh extension has
 to be recompiled for it.  You may not have the right version of the
 jssh extension for your version of Firefox.  You can get it here:

 http://wiki.openqa.org/display/WTR/FireWatir+Installation

 Hope this helps!

 -Tiffany

 On Mar 2, 2:41 pm, hliauw hli...@gmail.com wrote:

  Anyone knows what this exception message means?

  undefined method `messsage' for #JsshSocket::JSTypeError:
  this.docShell is null

  it came up on this statement:
  browser = Watir::Browser.new();

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] execution expired

2010-03-01 Thread hliauw
Hi, can somebody help me understand the following exceptions?  it
happened on both ie and firefox goto call.

E, [2010-03-01T04:11:28.918000 #2884] ERROR -- : Exception in goto:
execution expired: [C:/Ruby/lib/ruby/1.8/timeout.rb:60:in `wait',
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
355:in `goto', C:\\myFolder/myWrapperFile.rb:64:in `goto', C:/Ruby/
lib/ruby/1.8/timeout.rb:62:in `timeout', C:\\myFolder/
myWrapperFile.rb:62:in `goto', C:/myFolder/myTestFile1.rb:30]

E, [2010-02-27T04:13:58.575000 #3888] ERROR -- : Exception in goto:
execution expired: [C:/Ruby/lib/ruby/1.8/timeout.rb:60:in
`read_socket', C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/
firewatir/jssh_socket.rb:6:in `js_eval', C:/Ruby/lib/ruby/gems/1.8/
gems/firewatir-1.6.5/lib/firewatir/firefox.rb:492:in `wait', C:/Ruby/
lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/firefox.rb:196:in
`goto', C:\\myFolder/myWrapperFile.rb:64:in `goto', C:/Ruby/lib/
ruby/1.8/timeout.rb:62:in `timeout', C:\\myFolder/myWrapperFile.rb:
62:in `goto', C:/myFolder/myTestFile2.rb:26]

here is the relevant code in myWrapperFile.rb starting from line 62:
Timeout::timeout(toutval) do
  begin
browser.goto(url)
  rescue Timeout::Error
logger.error(goto call got hung after #{toutval}s);
  rescue Exception = e
logger.error(Exception in goto: #{e.message}:
#{e.backtrace.inspect});
  end
end

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: execution expired

2010-03-01 Thread hliauw
Windy, thanks a bunch.
toutval is currently set to 30s and 40s respectively. The url is an
internal test page with just 9 images in it. I tested the url manually
from the same machine and it loads within 1-2s. I should say that we
are actually using watir+browser to test a proxy server so there is a
possibility of an error there. However, we already looked at the proxy
logs and it shows that it already sent all the images back to the
browser.




On Mar 1, 12:27 pm, windy lyfi2...@sina.com wrote:
 method Timeout::timeout throw Timeout::Erorr exceptions,it happens if  
 browser can't open or open it too slow.

 you should test the url manual,or increase var 'toutval'.

 ÔÚ Tue, 02 Mar 2010 01:17:53 +0800£¬hliauw hli...@gmail.com дµÀ:



  Hi, can somebody help me understand the following exceptions?  it
  happened on both ie and firefox goto call.

  E, [2010-03-01T04:11:28.918000 #2884] ERROR -- : Exception in goto:
  execution expired: [C:/Ruby/lib/ruby/1.8/timeout.rb:60:in `wait',
  C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:
  355:in `goto', C:\\myFolder/myWrapperFile.rb:64:in `goto', C:/Ruby/
  lib/ruby/1.8/timeout.rb:62:in `timeout', C:\\myFolder/
  myWrapperFile.rb:62:in `goto', C:/myFolder/myTestFile1.rb:30]

  E, [2010-02-27T04:13:58.575000 #3888] ERROR -- : Exception in goto:
  execution expired: [C:/Ruby/lib/ruby/1.8/timeout.rb:60:in
  `read_socket', C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/
  firewatir/jssh_socket.rb:6:in `js_eval', C:/Ruby/lib/ruby/gems/1.8/
  gems/firewatir-1.6.5/lib/firewatir/firefox.rb:492:in `wait', C:/Ruby/
  lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/firefox.rb:196:in
  `goto', C:\\myFolder/myWrapperFile.rb:64:in `goto', C:/Ruby/lib/
  ruby/1.8/timeout.rb:62:in `timeout', C:\\myFolder/myWrapperFile.rb:
  62:in `goto', C:/myFolder/myTestFile2.rb:26]

  here is the relevant code in myWrapperFile.rb starting from line 62:
  Timeout::timeout(toutval) do
    begin
      browser.goto(url)
    rescue Timeout::Error
      logger.error(goto call got hung after #{toutval}s);
    rescue Exception = e
      logger.error(Exception in goto: #{e.message}:
  #{e.backtrace.inspect});
    end
  end

 --
 ʹÓà Opera ¸ïÃüÐԵĵç×ÓÓʼþ¿Í»§³ÌÐò:http://www.opera.com/mail/

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] browser.goto does not return

2010-02-24 Thread hliauw
Hi all,

I got this strange issue on my test. First of all, i'm still trying to
nail down the problem and looking for help to pinpoint the root cause
so please bear with me. :)

I have a windows XP on a VM workstation setup where ruby, watir and
browsers sit. in my series of tests, i use both firefox and ie. My
test driver creates a telnet connection to this windowxp-VM  and call
the watir test script one by one. Each call is given a 60s time to
finish its job and returns. If it does not return within 60s, another
telnet session will kill the ruby taks followed by the firefox or ie
tasks.

This timeout has been happening frequently in this setup and it's
happening in different tests. so i suspect it is not a problem with
what is goes on inside the test. I also look at the wireshark capture
and notice that this problem occured at the end of the page. Either
after the browser receive the last resource, or after sending request
for favicon.ico . So based on this i conclude that the watir script
got hung on goto function call.

I also notice that when the test driver tried to kill the browser,
most of the time the firefox process is already gone. (maybe  all the
time)

so i have the following questions:
1. can anyone verifies the behavior of page load in firefox and ie
with respect to favicon. Will watir goto function returns before or
after favicon?
2. if a browser(ie or ff) crashed, will browser.goto function returns
with some sort of exception?
note: since the call to watir is done through telnet, i don't get any
gui to verify if ti crash or not.

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Save image in Firefox

2009-12-21 Thread hliauw
Thanks for the reply.
I'll open a new ticket. In the mean time, is there a way to get the
image's binary data?

On Dec 21, 4:54 am, Angrez Singh ang...@gmail.com wrote:
 As of now FireWatir doesn't support saving a image. You can open a JIRA
 ticket for the same.

 - Angrez

 On Sat, Dec 19, 2009 at 2:42 AM, hliauw hli...@gmail.com wrote:
  Hi all,

  Does firewatir support image(...).save like in ie? I have been testing
  on ie for a while, and have a need to test using firefox. some scripts
  I had uses image.save and it has been failing on firefox.

  Here are some snippets:
  browser = Watir::Browser.new()
  browser.goto(url)
  browser.image(:index, 1).save(c:\\tempfile.gif)

  When I run the script, it doesn't throw any error, but the file is
  never created.
  When I use irb, it gives me the following error on save:
  = TypeError: elements_IMG[0].save is not a function

  Google and Watir search doesn't help me much. Anybody have a clue?

  --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Save image in Firefox

2009-12-21 Thread hliauw
Thanks for the reply.
So, what the tests does is basically save the image into a file and
calculate the md5 digest from the file. Is there a way to get the
image's binary data without saving it to a file first?


On Dec 21, 4:54 am, Angrez Singh ang...@gmail.com wrote:
 As of now FireWatir doesn't support saving a image. You can open a JIRA
 ticket for the same.

 - Angrez

 On Sat, Dec 19, 2009 at 2:42 AM, hliauw hli...@gmail.com wrote:
  Hi all,

  Does firewatir support image(...).save like in ie? I have been testing
  on ie for a while, and have a need to test using firefox. some scripts
  I had uses image.save and it has been failing on firefox.

  Here are some snippets:
  browser = Watir::Browser.new()
  browser.goto(url)
  browser.image(:index, 1).save(c:\\tempfile.gif)

  When I run the script, it doesn't throw any error, but the file is
  never created.
  When I use irb, it gives me the following error on save:
  = TypeError: elements_IMG[0].save is not a function

  Google and Watir search doesn't help me much. Anybody have a clue?

  --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general