[wtr-general] Quit from the mail list

2008-10-31 Thread 伞云飞
 
 
 
 I want to quit, please help, thanks!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Quit from the mail list

2008-10-31 Thread Željko Filipin
You are now unsubscribed.

Željko

2008/10/31 伞云飞 [EMAIL PROTECTED]
  I want to quit, please help, thanks!

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Can I change status of a test (in test unit)

2008-10-31 Thread LanOK

One of my tests always returns error, so I want to change it's status
in to pass.
 I'm using test unit.
Does anybody know how make test unit not to registrate an error in
this test?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Firewatir support for cookies

2008-10-31 Thread Tony

Hi,

Have been able to get cookie information from firefox using the below
code.
All the cookies are returned as an array with all the information.
Thought would share the same
Still working on updating and creating a new cookie.

module FireWatir
class Firefox

# - gets all cookies from browser
def getAllCookies
jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr =
comp.classes[\@mozilla.org/cookiemanager;
1\].getService(comp.interfaces.nsICookieManager);
jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator;
e.hasMoreElements();) { var cookie =
e.getNext().QueryInterface(comp.interfaces.nsICookie); 
jssh_command += allcookies = allcookies + cookie.host + \;\ +
cookie.name + \='\ + cookie.value + \';Path=\ +cookie.path +
\;isSecure=\ + cookie.isSecure + 
jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ +
cookie.status + \;Policy=\ + cookie.policy + \\\n\; } allcookies;
$jssh_socket.send(#{jssh_command}\n, 0)
val = read_socket()
vals = val.split(\n)
return vals
end

#- getSessionCookies
def getSessionCookies
jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr =
comp.classes[\@mozilla.org/cookiemanager;
1\].getService(comp.interfaces.nsICookieManager);
jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator;
e.hasMoreElements();) { var cookie =
e.getNext().QueryInterface(comp.interfaces.nsICookie); 
jssh_command += if (cookie.expires == 0) { allcookies = allcookies +
cookie.host + \;\ + cookie.name + \='\ + cookie.value +\';Path=\
+cookie.path + \;isSecure=\ + cookie.isSecure + 
jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ +
cookie.status + \;Policy=\ + cookie.policy + \\\n\; } }
allcookies;
$jssh_socket.send(#{jssh_command}\n, 0)
val = read_socket()
vals = val.split(\n)
return vals
end

# - get persistentCookies
def getPersistentCookies
jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr =
comp.classes[\@mozilla.org/cookiemanager;
1\].getService(comp.interfaces.nsICookieManager);
jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator;
e.hasMoreElements();) { var cookie =
e.getNext().QueryInterface(comp.interfaces.nsICookie); 
jssh_command += if (cookie.expires != 0) { allcookies = allcookies +
cookie.host + \;\ + cookie.name + \='\ + cookie.value +\';Path=\
+cookie.path + \;isSecure=\ + cookie.isSecure + 
jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ +
cookie.status + \;Policy=\ + cookie.policy + \\\n\; } }
allcookies;
$jssh_socket.send(#{jssh_command}\n, 0)
val = read_socket()
vals = val.split(\n)
return vals
end

# - getCookie by Name or by Name and domain
def getCookie(cookiename, domain = nil)
cookiename = cookiename.upcase
jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr =
comp.classes[\@mozilla.org/cookiemanager;
1\].getService(comp.interfaces.nsICookieManager);
jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator;
e.hasMoreElements();) { var cookie =
e.getNext().QueryInterface(comp.interfaces.nsICookie); 
if domain.nil?
jssh_command += if (cookie.name.toUpperCase() == \#{cookiename}\)
{ allcookies = allcookies + cookie.host + \;\ + cookie.name + \=\
+ cookie.value +\;Path=\ +cookie.path + \;isSecure=\ +
cookie.isSecure + 
else
jssh_command += if (cookie.name.toUpperCase() == \#{cookiename}\ 
cookie.host == \#{domain}\) { allcookies = allcookies + cookie.host
+ \;\ + cookie.name + \=\ + cookie.value +\;Path=\ +cookie.path
+ \;isSecure=\ + cookie.isSecure + 
end
jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ +
cookie.status + \;Policy=\ + cookie.policy + \\\n\; } }
allcookies;
$jssh_socket.send(#{jssh_command}\n, 0)
val = read_socket()
vals = val.split(\n)
return vals
end

# - getCookies By a particular domain/host
def getCookiesByDomain(domain)
if (!domain.nil?  domain[0] != .)
domain = . + domain
end
vals = []
i=0
while (i2)
jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr =
comp.classes[\@mozilla.org/cookiemanager;
1\].getService(comp.interfaces.nsICookieManager);
jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator;
e.hasMoreElements();) { var cookie =
e.getNext().QueryInterface(comp.interfaces.nsICookie); 
jssh_command += if (cookie.host == \#{domain}\) { allcookies =
allcookies + cookie.host + \;\ + cookie.name + \=\ + cookie.value +
\;Path=\ +cookie.path + \;isSecure=\ + cookie.isSecure + 
jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ +
cookie.status + \;Policy=\ + cookie.policy + \\\n\; } }
allcookies;
$jssh_socket.send(#{jssh_command}\n, 0)
val = read_socket()
vals.concat (val.split(\n))
i=i+1
domain = domain[1..domain.length]
end
return vals
end

end
end

Let me know if this has been useful ... sadly i was not able to get
any info to do the same in IE.

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

[wtr-general] Re: Can I change status of a test (in test unit)

2008-10-31 Thread LanOK

I'm testing an application which has javascript and flash/flex
components.
So When I have HTML window, I use Watir. when flex - I use Funfx.
When my test close flex-pop-up window, it mark it as an error.
And says something like:
the connection with flex component was lost
(I can't show you the original exeption in english, My watir doesn't
support engish error-exeption)
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Can I change status of a test (in test unit)

2008-10-31 Thread Bret Pettichord

LanOK wrote:
 One of my tests always returns error, so I want to change it's status
 in to pass.
  I'm using test unit.
 Does anybody know how make test unit not to register an error in
 this test?
If i have a bad test that i don't want to delete, i change its name to 
xtest_whatever. Then it won't be run any more.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir 1.6.0 Available for Preview Testing

2008-10-31 Thread Bret Pettichord

I've reproduced the problem. Another workaround is to add gem 'watir' 
to the top of the script. I'm trying to understand more about why this 
is happening.

As background, Watir 1.6 now autoloads firewatir original-watir (now 
called watir-ie) or safariwatir based configuration. This is where the 
problem is occuring.

Bret

Bret Pettichord wrote:
 Good report. This shouldn't be happening. Let me figure out what is 
 going on. Thanks for posting your workaround.

 Bret


 Tony wrote:
   
 While trying to run a testcase i keep getting an error -
 This is the script -
 require 'watir'
 Watir::Browser.default = 'ie'
 brow = Watir::Browser.new()
 brow.goto(http://www.aol.com;)
 brow.close

 tried with both firefox and ie and i get the same error
 watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
 `klass': uninitialized constant Watir::IE (NameError)
 watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
 `klass': uninitialized constant FireWatir::Firefox (NameError)

 Made changes to browser.rb, added this at the beginning of the file to
 make it work-
 require 'watir/options'
 require 'watir/ie'
 require 'firewatir'

 -Tony
 
   
 


 
   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Watir 1.6.1 is available for testing

2008-10-31 Thread Bret Pettichord

I have built and uploaded Watir 1.6.1. This fixes all of the 
install/load problems reported by MarekJ and Tony, and in fact has a 
simplified install process.

Details here
http://wiki.openqa.org/display/WTR/Development+Builds

Please let me know of any trouble with this. If it looks good, I will 
upload it to Rubyforge. Thanks for your help.

Bret

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir 1.6.0 Available for Preview Testing

2008-10-31 Thread Bret Pettichord

Tiffany,

I broke all of the watir/firewatir unit tests when run from gems. At 
this point you need to run them
out of trunk. I'll update the 1.6. page.

How badly do you all want me to fix this?

Bret

Tiffany Fodor wrote:
 Hi All!

 I've been trying to run the FireWatir 1.6.0 unit tests, but each time
 I get the following error as they start:

 C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/setup.rb:14:
 uninitialized constant Watir::Browser (NameError)
 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
 27:in `gem_original_require'
 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
 27:in `require'
 from C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/
 mozilla_all_tests.rb:3

 This happens with both the mozilla_all_tests.rb and
 attach_to_new_window_test.rb.  I followed the installation
 instructions on the FireWatir Installation page (http://
 wiki.openqa.org/display/WTR/FireWatir
 +Installation#FireWatirInstallation-ffsettings) and I've gone through
 the FireWatir Troubleshooting page (http://wiki.openqa.org/display/WTR/
 FireWatir+Troubleshooting), but I can't find anything wrong with my
 setup.

 Any ideas?

 Thanks!

 -Tiffany

 On Oct 31, 9:42 am, Bret Pettichord [EMAIL PROTECTED] wrote:
   
 I've reproduced the problem. Another workaround is to add gem 'watir'
 to the top of the script. I'm trying to understand more about why this
 is happening.

 As background, Watir 1.6 now autoloads firewatir original-watir (now
 called watir-ie) or safariwatir based configuration. This is where the
 problem is occuring.

 Bret

 Bret Pettichord wrote:
 
 Good report. This shouldn't be happening. Let me figure out what is
 going on. Thanks for posting your workaround.
   
 Bret
   
 Tony wrote:
   
 While trying to run a testcase i keep getting an error -
 This is the script -
 require 'watir'
 Watir::Browser.default = 'ie'
 brow = Watir::Browser.new()
 brow.goto(http://www.aol.com;)
 brow.close
 
 tried with both firefox and ie and i get the same error
 watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
 `klass': uninitialized constant Watir::IE (NameError)
 watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
 `klass': uninitialized constant FireWatir::Firefox (NameError)
 
 Made changes to browser.rb, added this at the beginning of the file to
 make it work-
 require 'watir/options'
 require 'watir/ie'
 require 'firewatir'
 
 -Tony
 
 
   


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir 1.6.0 Available for Preview Testing

2008-10-31 Thread Tiffany Fodor

Hey Bret!

I don't really need the unit tests.  I first tried to get some of my
existing tests to run with FireWatir and when they failed, decided to
try out the unit tests to see if the problem was in my tests.  I'm
getting the same error when I try to run my tests in Firefox.

I don't want to take up your time with something that might be a
problem with my configuration - I'll do some more digging.  I'm
currently using Vista, so I'll try to do a new install on Vista and if
that doesn't work, I'll give it a shot on XP to try to narrow in on
the problem.

I did run some of my tests on IE without any problems.  :)

-Tiffany

On Oct 31, 1:57 pm, Bret Pettichord [EMAIL PROTECTED] wrote:
 Tiffany,

 I broke all of the watir/firewatir unit tests when run from gems. At
 this point you need to run them
 out of trunk. I'll update the 1.6. page.

 How badly do you all want me to fix this?

 Bret

 Tiffany Fodor wrote:
  Hi All!

  I've been trying to run the FireWatir 1.6.0 unit tests, but each time
  I get the following error as they start:

  C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/setup.rb:14:
  uninitialized constant Watir::Browser (NameError)
          from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  27:in `gem_original_require'
          from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  27:in `require'
          from C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/
  mozilla_all_tests.rb:3

  This happens with both the mozilla_all_tests.rb and
  attach_to_new_window_test.rb.  I followed the installation
  instructions on the FireWatir Installation page (http://
  wiki.openqa.org/display/WTR/FireWatir
  +Installation#FireWatirInstallation-ffsettings) and I've gone through
  the FireWatir Troubleshooting page (http://wiki.openqa.org/display/WTR/
  FireWatir+Troubleshooting), but I can't find anything wrong with my
  setup.

  Any ideas?

  Thanks!

  -Tiffany

  On Oct 31, 9:42 am, Bret Pettichord [EMAIL PROTECTED] wrote:

  I've reproduced the problem. Another workaround is to add gem 'watir'
  to the top of the script. I'm trying to understand more about why this
  is happening.

  As background, Watir 1.6 now autoloads firewatir original-watir (now
  called watir-ie) or safariwatir based configuration. This is where the
  problem is occuring.

  Bret

  Bret Pettichord wrote:

  Good report. This shouldn't be happening. Let me figure out what is
  going on. Thanks for posting your workaround.

  Bret

  Tony wrote:

  While trying to run a testcase i keep getting an error -
  This is the script -
  require 'watir'
  Watir::Browser.default = 'ie'
  brow = Watir::Browser.new()
  brow.goto(http://www.aol.com;)
  brow.close

  tried with both firefox and ie and i get the same error
  watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
  `klass': uninitialized constant Watir::IE (NameError)
  watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
  `klass': uninitialized constant FireWatir::Firefox (NameError)

  Made changes to browser.rb, added this at the beginning of the file to
  make it work-
  require 'watir/options'
  require 'watir/ie'
  require 'firewatir'

  -Tony
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir 1.6.0 Available for Preview Testing

2008-10-31 Thread Tiffany Fodor

Hi again!

I had previous versions of Watir installed (1.5.2 and 1.5.3) as well
as 1.6.0.  My problem went away when I uninstalled all of the versions
and reinstalled 1.6.0.

I haven't done a ton of testing FireWatir yet, but here are a couple
of issues I've come across.

1.  There doesn't seem to be support for the Watir::Browser.find
method in 1.6.0 with IE or Firefox.  (Maybe you just haven't got to
this yet.)

2.  Working with links using the link text may be different with
FireWatir.  For example, my application's login page has a link with
text Login.

the command fox.link(:text, 'Login').click gives the following error:

Watir::Exception::UnknownObjectException: Unable to locate element,
using :text, Login
from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
firewatir/MozillaBaseElement.rb:967:in `assert_exists'
from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
firewatir/MozillaBaseElement.rb:1125:in `click'
from (irb):58

but using a regex for the link text works - fox.link(:text, /
Login/).click

I've used the DOM inspector in Firefox and found that there may be a
leading and trailing space around the text, so I tried fox.link(:text,
' Login ').click but that doesn't work either.

Is this just a difference in working with Firefox versus IE?  Clicking
on the link using text 'Login' works fine in IE.  I'll keep working on
this here to see if it's just something strange with our application.

Thanks so much for all your work on this.  I'm so excited to get tests
running against Firefox!

-Tiffany

On Oct 31, 2:14 pm, Tiffany Fodor [EMAIL PROTECTED] wrote:
 Hey Bret!

 I don't really need the unit tests.  I first tried to get some of my
 existing tests to run with FireWatir and when they failed, decided to
 try out the unit tests to see if the problem was in my tests.  I'm
 getting the same error when I try to run my tests in Firefox.

 I don't want to take up your time with something that might be a
 problem with my configuration - I'll do some more digging.  I'm
 currently using Vista, so I'll try to do a new install on Vista and if
 that doesn't work, I'll give it a shot on XP to try to narrow in on
 the problem.

 I did run some of my tests on IE without any problems.  :)

 -Tiffany

 On Oct 31, 1:57 pm, Bret Pettichord [EMAIL PROTECTED] wrote:

  Tiffany,

  I broke all of the watir/firewatir unit tests when run from gems. At
  this point you need to run them
  out of trunk. I'll update the 1.6. page.

  How badly do you all want me to fix this?

  Bret

  Tiffany Fodor wrote:
   Hi All!

   I've been trying to run the FireWatir 1.6.0 unit tests, but each time
   I get the following error as they start:

   C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/setup.rb:14:
   uninitialized constant Watir::Browser (NameError)
           from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
   27:in `gem_original_require'
           from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
   27:in `require'
           from C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/
   mozilla_all_tests.rb:3

   This happens with both the mozilla_all_tests.rb and
   attach_to_new_window_test.rb.  I followed the installation
   instructions on the FireWatir Installation page (http://
   wiki.openqa.org/display/WTR/FireWatir
   +Installation#FireWatirInstallation-ffsettings) and I've gone through
   the FireWatir Troubleshooting page (http://wiki.openqa.org/display/WTR/
   FireWatir+Troubleshooting), but I can't find anything wrong with my
   setup.

   Any ideas?

   Thanks!

   -Tiffany

   On Oct 31, 9:42 am, Bret Pettichord [EMAIL PROTECTED] wrote:

   I've reproduced the problem. Another workaround is to add gem 'watir'
   to the top of the script. I'm trying to understand more about why this
   is happening.

   As background, Watir 1.6 now autoloads firewatir original-watir (now
   called watir-ie) or safariwatir based configuration. This is where the
   problem is occuring.

   Bret

   Bret Pettichord wrote:

   Good report. This shouldn't be happening. Let me figure out what is
   going on. Thanks for posting your workaround.

   Bret

   Tony wrote:

   While trying to run a testcase i keep getting an error -
   This is the script -
   require 'watir'
   Watir::Browser.default = 'ie'
   brow = Watir::Browser.new()
   brow.goto(http://www.aol.com;)
   brow.close

   tried with both firefox and ie and i get the same error
   watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
   `klass': uninitialized constant Watir::IE (NameError)
   watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
   `klass': uninitialized constant FireWatir::Firefox (NameError)

   Made changes to browser.rb, added this at the beginning of the file to
   make it work-
   require 'watir/options'
   require 'watir/ie'
   require 'firewatir'

   -Tony
--~--~-~--~~~---~--~~
You received this message because 

[wtr-general] Re: Watir 1.6.0 Available for Preview Testing

2008-10-31 Thread Tiffany Fodor

Hi again!

I had previous versions of Watir installed (1.5.2 and 1.5.3) as well
as 1.6.0.  My problem went away when I uninstalled all of the versions
and reinstalled 1.6.0.

I haven't done a ton of testing FireWatir yet, but here are a couple
of issues I've come across.

1.  There doesn't seem to be support for the Watir::Browser.find
method in 1.6.0 with IE or Firefox.  (Maybe you just haven't got to
this yet.)

2.  Working with links using the link text may be different with
FireWatir.  For example, my application's login page has a link with
text Login.

the command fox.link(:text, 'Login').click gives the following error:

Watir::Exception::UnknownObjectException: Unable to locate element,
using :text, Login
from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
firewatir/MozillaBaseElement.rb:967:in `assert_exists'
from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
firewatir/MozillaBaseElement.rb:1125:in `click'
from (irb):58

but using a regex for the link text works - fox.link(:text, /
Login/).click

I've used the DOM inspector in Firefox and found that there may be a
leading and trailing space around the text, so I tried fox.link(:text,
' Login ').click but that doesn't work either.

Is this just a difference in working with Firefox versus IE?  Clicking
on the link using text 'Login' works fine in IE.  I'll keep working on
this here to see if it's just something strange with our application.

Thanks so much for all your work on this.  I'm so excited to get tests
running against Firefox!

-Tiffany

On Oct 31, 2:14 pm, Tiffany Fodor [EMAIL PROTECTED] wrote:
 Hey Bret!

 I don't really need the unit tests.  I first tried to get some of my
 existing tests to run with FireWatir and when they failed, decided to
 try out the unit tests to see if the problem was in my tests.  I'm
 getting the same error when I try to run my tests in Firefox.

 I don't want to take up your time with something that might be a
 problem with my configuration - I'll do some more digging.  I'm
 currently using Vista, so I'll try to do a new install on Vista and if
 that doesn't work, I'll give it a shot on XP to try to narrow in on
 the problem.

 I did run some of my tests on IE without any problems.  :)

 -Tiffany

 On Oct 31, 1:57 pm, Bret Pettichord [EMAIL PROTECTED] wrote:

  Tiffany,

  I broke all of the watir/firewatir unit tests when run from gems. At
  this point you need to run them
  out of trunk. I'll update the 1.6. page.

  How badly do you all want me to fix this?

  Bret

  Tiffany Fodor wrote:
   Hi All!

   I've been trying to run the FireWatir 1.6.0 unit tests, but each time
   I get the following error as they start:

   C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/setup.rb:14:
   uninitialized constant Watir::Browser (NameError)
           from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
   27:in `gem_original_require'
           from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
   27:in `require'
           from C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/
   mozilla_all_tests.rb:3

   This happens with both the mozilla_all_tests.rb and
   attach_to_new_window_test.rb.  I followed the installation
   instructions on the FireWatir Installation page (http://
   wiki.openqa.org/display/WTR/FireWatir
   +Installation#FireWatirInstallation-ffsettings) and I've gone through
   the FireWatir Troubleshooting page (http://wiki.openqa.org/display/WTR/
   FireWatir+Troubleshooting), but I can't find anything wrong with my
   setup.

   Any ideas?

   Thanks!

   -Tiffany

   On Oct 31, 9:42 am, Bret Pettichord [EMAIL PROTECTED] wrote:

   I've reproduced the problem. Another workaround is to add gem 'watir'
   to the top of the script. I'm trying to understand more about why this
   is happening.

   As background, Watir 1.6 now autoloads firewatir original-watir (now
   called watir-ie) or safariwatir based configuration. This is where the
   problem is occuring.

   Bret

   Bret Pettichord wrote:

   Good report. This shouldn't be happening. Let me figure out what is
   going on. Thanks for posting your workaround.

   Bret

   Tony wrote:

   While trying to run a testcase i keep getting an error -
   This is the script -
   require 'watir'
   Watir::Browser.default = 'ie'
   brow = Watir::Browser.new()
   brow.goto(http://www.aol.com;)
   brow.close

   tried with both firefox and ie and i get the same error
   watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
   `klass': uninitialized constant Watir::IE (NameError)
   watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in
   `klass': uninitialized constant FireWatir::Firefox (NameError)

   Made changes to browser.rb, added this at the beginning of the file to
   make it work-
   require 'watir/options'
   require 'watir/ie'
   require 'firewatir'

   -Tony
--~--~-~--~~~---~--~~
You received this message because 

[wtr-general] Re: Watir 1.6.0 Available for Preview Testing

2008-10-31 Thread Bret Pettichord

Tiffany Fodor wrote:
 Hi again!

 I had previous versions of Watir installed (1.5.2 and 1.5.3) as well
 as 1.6.0.  My problem went away when I uninstalled all of the versions
 and reinstalled 1.6.0.
   
Interesting. This shouldn't be necessary, so I'd like to learn more 
about these problems (from you or others).
 I haven't done a ton of testing FireWatir yet, but here are a couple
 of issues I've come across.

 1.  There doesn't seem to be support for the Watir::Browser.find
 method in 1.6.0 with IE or Firefox.  (Maybe you just haven't got to
 this yet.)
   
This is true. There is no support for this command with Firefox. I've 
added this to the list.
http://wiki.openqa.org/display/WTR/Firewatir+Compatibility
 2.  Working with links using the link text may be different with
 FireWatir.  For example, my application's login page has a link with
 text Login.

 the command fox.link(:text, 'Login').click gives the following error:

 Watir::Exception::UnknownObjectException: Unable to locate element,
 using :text, Login
 from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
 firewatir/MozillaBaseElement.rb:967:in `assert_exists'
 from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
 firewatir/MozillaBaseElement.rb:1125:in `click'
 from (irb):58

 but using a regex for the link text works - fox.link(:text, /
 Login/).click

 I've used the DOM inspector in Firefox and found that there may be a
 leading and trailing space around the text, so I tried fox.link(:text,
 ' Login ').click but that doesn't work either.

 Is this just a difference in working with Firefox versus IE?  Clicking
 on the link using text 'Login' works fine in IE.  I'll keep working on
 this here to see if it's just something strange with our application.
   
I've seen reports of this before, but haven't not been able to 
reproduce. You provide some interesting details. Can you provide a page 
that we can reproduce this problem with?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir 1.6.0 Available for Preview Testing

2008-10-31 Thread Bret Pettichord

Thanks for the report and the fix. This is also something I've heard 
about, but had not been able to reproduce.

Can you show us a page that demonstrates this problem?

Bret

Michael Hwee wrote:
 On Firewatir, extracting text from ff gives extra special chars.
 For example, I got extra ox160 and some other weird chars.
 String-matching almost always failed.

 Wrote cleaning method to clean up the extracted text.

 def cleanText dirty_text
 newstr = 
 dirty_text.length.times do |i|
 character = dirty_text[i]
 #puts character
 newstr += if (character = 0x20  character  0x80)
 character.chr
   elsif character == 160
  
 else
 
 end
 end
 newstr
 end




 - Original Message 
 From: Tiffany Fodor [EMAIL PROTECTED]
 To: Watir General watir-general@googlegroups.com
 Sent: Friday, October 31, 2008 2:32:39 PM
 Subject: [wtr-general] Re: Watir 1.6.0 Available for Preview Testing


 Hi again!

 I had previous versions of Watir installed (1.5.2 and 1.5.3) as well
 as 1.6.0.  My problem went away when I uninstalled all of the versions
 and reinstalled 1.6.0.

 I haven't done a ton of testing FireWatir yet, but here are a couple
 of issues I've come across.

 1.  There doesn't seem to be support for the Watir::Browser.find
 method in 1.6.0 with IE or Firefox.  (Maybe you just haven't got to
 this yet.)

 2.  Working with links using the link text may be different with
 FireWatir.  For example, my application's login page has a link with
 text Login.

 the command fox.link(:text, 'Login').click gives the following error:

 Watir::Exception::UnknownObjectException: Unable to locate element,
 using :text, Login
 from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
 firewatir/MozillaBaseElement.rb:967:in `assert_exists'
 from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
 firewatir/MozillaBaseElement.rb:1125:in `click'
 from (irb):58

 but using a regex for the link text works - fox.link(:text, /
 Login/).click

 I've used the DOM inspector in Firefox and found that there may be a
 leading and trailing space around the text, so I tried fox.link(:text,
 ' Login ').click but that doesn't work either.

 Is this just a difference in working with Firefox versus IE?  Clicking
 on the link using text 'Login' works fine in IE.  I'll keep working on
 this here to see if it's just something strange with our application.

 Thanks so much for all your work on this.  I'm so excited to get tests
 running against Firefox!

 -Tiffany

 On Oct 31, 2:14 pm, Tiffany Fodor [EMAIL PROTECTED] wrote:
   
 Hey Bret!

 I don't really need the unit tests.  I first tried to get some of my
 existing tests to run with FireWatir and when they failed, decided to
 try out the unit tests to see if the problem was in my tests.  I'm
 getting the same error when I try to run my tests in Firefox.

 I don't want to take up your time with something that might be a
 problem with my configuration - I'll do some more digging.  I'm
 currently using Vista, so I'll try to do a new install on Vista and if
 that doesn't work, I'll give it a shot on XP to try to narrow in on
 the problem.

 I did run some of my tests on IE without any problems.  :)

 -Tiffany

 On Oct 31, 1:57 pm, Bret Pettichord [EMAIL PROTECTED] wrote:

 
 Tiffany,
   
 I broke all of the watir/firewatir unit tests when run from gems. At
 this point you need to run them
 out of trunk. I'll update the 1.6. page.
   
 How badly do you all want me to fix this?
   
 Bret
   
 Tiffany Fodor wrote:
   
 Hi All!
 
 I've been trying to run the FireWatir 1.6.0 unit tests, but each time
 I get the following error as they start:
 
 C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/setup.rb:14:
 uninitialized constant Watir::Browser (NameError)
 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
 27:in `gem_original_require'
 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
 27:in `require'
 from C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/
 mozilla_all_tests.rb:3
 
 This happens with both the mozilla_all_tests.rb and
 attach_to_new_window_test.rb.  I followed the installation
 instructions on the FireWatir Installation page (http://
 wiki.openqa.org/display/WTR/FireWatir
 +Installation#FireWatirInstallation-ffsettings) and I've gone through
 the FireWatir Troubleshooting page (http://wiki.openqa.org/display/WTR/
 FireWatir+Troubleshooting), but I can't find anything wrong with my
 setup.
 
 Any ideas?
 
 Thanks!
 
 -Tiffany
 
 On Oct 31, 9:42 am, Bret Pettichord [EMAIL PROTECTED] wrote:
 
 I've reproduced the problem. Another workaround is to add gem 'watir'
 to the top of the script. I'm trying to understand more about why this
 is happening.
   
 As 

[wtr-general] Re: Watir 1.6.0 Available for Preview Testing

2008-10-31 Thread Tiffany Fodor

Yep - here's the login page for our production site:

https://producer.icat.com/icatsss/Main.startup.do

Thanks!

-Tiffany

On Oct 31, 4:16 pm, Bret Pettichord [EMAIL PROTECTED] wrote:
 Thanks for the report and the fix. This is also something I've heard
 about, but had not been able to reproduce.

 Can you show us a page that demonstrates this problem?

 Bret

 Michael Hwee wrote:
  On Firewatir, extracting text from ff gives extra special chars.
  For example, I got extra ox160 and some other weird chars.
  String-matching almost always failed.

  Wrote cleaning method to clean up the extracted text.

  def cleanText dirty_text
          newstr = 
          dirty_text.length.times do |i|
              character = dirty_text[i]
              #puts character
              newstr += if (character = 0x20  character  0x80)
                  character.chr
                elsif character == 160
                   
              else
                  
              end
          end
          newstr
      end

  - Original Message 
  From: Tiffany Fodor [EMAIL PROTECTED]
  To: Watir General watir-general@googlegroups.com
  Sent: Friday, October 31, 2008 2:32:39 PM
  Subject: [wtr-general] Re: Watir 1.6.0 Available for Preview Testing

  Hi again!

  I had previous versions of Watir installed (1.5.2 and 1.5.3) as well
  as 1.6.0.  My problem went away when I uninstalled all of the versions
  and reinstalled 1.6.0.

  I haven't done a ton of testing FireWatir yet, but here are a couple
  of issues I've come across.

  1.  There doesn't seem to be support for the Watir::Browser.find
  method in 1.6.0 with IE or Firefox.  (Maybe you just haven't got to
  this yet.)

  2.  Working with links using the link text may be different with
  FireWatir.  For example, my application's login page has a link with
  text Login.

  the command fox.link(:text, 'Login').click gives the following error:

  Watir::Exception::UnknownObjectException: Unable to locate element,
  using :text, Login
          from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
  firewatir/MozillaBaseElement.rb:967:in `assert_exists'
          from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/
  firewatir/MozillaBaseElement.rb:1125:in `click'
          from (irb):58

  but using a regex for the link text works - fox.link(:text, /
  Login/).click

  I've used the DOM inspector in Firefox and found that there may be a
  leading and trailing space around the text, so I tried fox.link(:text,
  ' Login ').click but that doesn't work either.

  Is this just a difference in working with Firefox versus IE?  Clicking
  on the link using text 'Login' works fine in IE.  I'll keep working on
  this here to see if it's just something strange with our application.

  Thanks so much for all your work on this.  I'm so excited to get tests
  running against Firefox!

  -Tiffany

  On Oct 31, 2:14 pm, Tiffany Fodor [EMAIL PROTECTED] wrote:

  Hey Bret!

  I don't really need the unit tests.  I first tried to get some of my
  existing tests to run with FireWatir and when they failed, decided to
  try out the unit tests to see if the problem was in my tests.  I'm
  getting the same error when I try to run my tests in Firefox.

  I don't want to take up your time with something that might be a
  problem with my configuration - I'll do some more digging.  I'm
  currently using Vista, so I'll try to do a new install on Vista and if
  that doesn't work, I'll give it a shot on XP to try to narrow in on
  the problem.

  I did run some of my tests on IE without any problems.  :)

  -Tiffany

  On Oct 31, 1:57 pm, Bret Pettichord [EMAIL PROTECTED] wrote:

  Tiffany,

  I broke all of the watir/firewatir unit tests when run from gems. At
  this point you need to run them
  out of trunk. I'll update the 1.6. page.

  How badly do you all want me to fix this?

  Bret

  Tiffany Fodor wrote:

  Hi All!

  I've been trying to run the FireWatir 1.6.0 unit tests, but each time
  I get the following error as they start:

  C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/setup.rb:14:
  uninitialized constant Watir::Browser (NameError)
          from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  27:in `gem_original_require'
          from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
  27:in `require'
          from C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/unittests/
  mozilla_all_tests.rb:3

  This happens with both the mozilla_all_tests.rb and
  attach_to_new_window_test.rb.  I followed the installation
  instructions on the FireWatir Installation page (http://
  wiki.openqa.org/display/WTR/FireWatir
  +Installation#FireWatirInstallation-ffsettings) and I've gone through
  the FireWatir Troubleshooting page (http://wiki.openqa.org/display/WTR/
  FireWatir+Troubleshooting), but I can't find anything wrong with my
  setup.

  Any ideas?

  Thanks!

  -Tiffany

  On Oct 31, 9:42 am, Bret Pettichord [EMAIL PROTECTED] wrote:

  

[wtr-general] Re: Watir 1.6.0 Available for Preview Testing

2008-10-31 Thread Tiffany Fodor

  I had previous versions of Watir installed (1.5.2 and 1.5.3) as well
  as 1.6.0.  My problem went away when I uninstalled all of the versions
  and reinstalled 1.6.0.

 Interesting. This shouldn't be necessary, so I'd like to learn more
 about these problems (from you or others). I haven't done a ton of testing 
 FireWatir yet, but here are a couple
  of issues I've come across.


I've been working to get 1.6.0 running on my personal laptop (Vista),
but need to hold off on my work desktop (XP) until I get some tests
run.  When I have a chance, I'll try the same process on the XP box
and see if I need to uninstall Watir first there.

Have a great weekend!

-Tiffany


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---