Re: [Wtr-general] TextField#set and utf-8

2007-02-26 Thread Željko Filipin

Paul,

I just wanted to say thanks. I tried reading special characters (also
accented European characters) from Excel and setting text fields with that
and it works! (And, it was really simple.)

In case anybody is interested in details, visit my blog (zeljkofilipin.com).

If anybody has another solution, I am still interested.
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] WIN32OLERuntime Error

2007-02-26 Thread Lauren
Okay...all of my problems started after I removed WET because I wasn't using 
it. 

Uninstalling WET removed my latest version of WATIR.I then had to get one of my 
Sys Admins to come over and remove ruby and re-install ruby for me. I then 
grabbed the latest gem: 1.5.1.1158

I now get the following error running a script I was able to run before:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1824:in 
`method_missing': unknown property or method `readyState' (WIN32OLERuntimeError)
HRESULT error code:0x80070005
  Access is denied. from 
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1824:in `wait'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:2577:in 
`click'
from WBA_SmokeTest.rb:116

Any thoughts on what is going on?? does it have anything to do with the gem 
version (1.5.1.1158?)

Thanks,
Lauren
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6697messageID=19231#19231
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] WIN32OLERuntime Error

2007-02-26 Thread Lauren
Update:

Removing gem watir-1.5.1.1158 and then installing watir-1.5.1.1145 removes the 
error for me. I am now able to execute my script without error.

It appears there are some issues with watir-1.5.1.1158.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6697messageID=19238#19238
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Problem with wrapper created around Watir.rb

2007-02-26 Thread Bret Pettichord
Your problem is that unlike the Watir::IE objects, the objects returned 
by Watir::IE::Frame are short lived. You are using your reference for 
too long. Specifically a page refresh invalidates the object. Details below.

Bret

  # return a current, valid reference to the frame.
  def content_frame
@ie.frame(ifr_content)
  end

  # Don't change the @ie object to be the frame!
  def setup
  @ie = getIEinstance
  set_environment(@ie)
  login(@ie, radmin, radmin747) # Calls the Login Method which 
intoduces the wrapper that is
  end  
 
  # Use the new content_frame method
  def test_RuleTemplateWithRule 
content_frame.link(:text,'Update the Information).click

etc...

Ajitesh Srinetra wrote:
 Hi Bret
 This is one sample testcase



 require File.dirname(__FILE__) + '/../../../test_helper'
 require File.dirname(__FILE__) + '/../../../Methods/ProcessRecords'
 require File.dirname (__FILE__) + '/../../../Methods/RuleCreation'

 class RuleTemplateWithRule_test  Test::Unit::TestCase
  
   def setup
   @ie = getIEinstance
   set_environment(@ie)
   @ie=login(@ie, radmin, radmin747) # Calls the Login Method 
 which intoduces the wrapper that is
   end
 
   def teardown
 closeIE(@ie)
   end
 
   def test_RuleTemplateWithRule
  
  @ie.link(:text,'Update the Information).click

  #Here the Refresh is happening

 assert(@ie.contains_text('Another Rule is added'))

# The TestCase starts failing from here as it is not able to find 
 the next link as the object ie= ie.frame(ifr_content) is lost

 @ie.link(:text, 'View Templates').click
 assert_equal(enable, (@ie.image(:name, 
 'show_CumulativeUsageForIMSI').id))
 assert_equal(disable, (@ ie.image(:name, 
 'editCumulativeUsageForIMSI').id))
 assert_equal(disable, (@ie.image(:name, 
 'deleteCumulativeUsageForIMSI').id))
   end
   end
  

 The Login method used earlier in the testcase is writeen below
  def login(ie,username,password)
ie.text_field(:name, ranger_user[name]).set(username)
  ie.text_field(:name, ranger_user[password]).set(password)
  ie.button(:name, commit).click
sleep 2
return ie.frame(ifr_content) #returns the iframe object
   end

 I am also using @ie.refresh in some testcases.So I think the method 
 also needs to be modified .

 Thanks and Regards
 Ajitesh
 

 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Nested Frames

2007-02-26 Thread Bret Pettichord
Akhil Mehra wrote:
 No the applications is currently hosted on the same server.  I get the 
 following error when clicking on a link from one frame which inter 
 updates another frame. 
  
 Exception: unknown property or method `readyState'
 HRESULT error code:0x80070005
   Access is denied.
I've also seen these errors in an app that does not use frames. They 
have gone aways since we updated to use 1.5.1.1162 (which has yet to be 
released, but which you can build yourself).

Bret

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Installing FireWatir on Intel Mac OS X Tiger (Intel)

2007-02-26 Thread Christopher Rasch
Hi,



I'm trying to get FireWatir 1.0.1 installed and working on Mac OS X 
Tiger (Intel), v. 10.4.8. However, the unittests won't run, and when I 
try to debug, I'm getting what appear to be errors related to my 
readline installation. I'm documenting the process at my blog:

http://crasch.livejournal.com/522657.html

I've also copied the blog entry below. Anyone have any suggestions for 
what to try next? Thanks!

Chris

About my setup:

Firefox 2.0.0.2
Mac OS X 10.4.8 (Intel)
XCode 2.4.1


Here's what I've done so far:

* Download and install Firefox.

* Install the jssh extension. You can find it here:

http://people.mozilla.org/~davel/jssh/jssh-20060622-Darwin.xpi

To install it, double-click on the link above.

* Start Firefox manually with the jssh extension as follows:

$ cd /Applications/Firefox.app/Contents/MacOS

$ ./firefox -jssh 

* If the jssh installation works, you should be able to telnet to port 
9997:

$ telnet localhost 9997
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to the Mozilla JavaScript Shell!

* Install the firewatir gem. You can find the gem here:

http://code.google.com/p/firewatir/downloads/list

Once you've downloaded it, cd to the download directory and install as 
follows:

$ cd ~/Desktop
$ sudo gem install --local firewatir-1.0.1-mswin32.gem

You should see:

Password:
Successfully installed firewatir, version 1.0.1
Installing ri documentation for firewatir-1.0.1-mswin32...
Installing RDoc documentation for firewatir-1.0.1-mswin32...

* To test that the unittests have run successfully, go to the unit tests 
directory in the firewatir gem install. Run “ruby mozilla_all_tests.rb” 
to run the unit test cases.

$ ruby mozilla_all_tests.rb
Loaded suite mozilla_all_tests
Started

[At this point, the script just hangs and does nothing until you 
interrupt it. I tried to run it with ruby-debug, by adding the following 
line to setup.rb:

require 'ruby-debug'
debugger

However, when I ran it again, I got the following error:

crasch2:/usr/local/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests 
crasch$ ruby mozilla_all_tests.rb
dyld: NSLinkModule() error
dyld: Symbol not found: _rl_filename_completion_function
Referenced from: /usr/local/lib/ruby/1.8/i686-darwin8.8.1/readline.bundle
Expected in: flat namespace

Trace/BPT trap

A search for the error message suggests that there is a problem with my 
readline installation. Readline is installed on my machine via ports:

$ port installed
The following ports are currently installed:
...
readline @5.1.004_0 (active)
...

Next I tried to rebuild readline per the instructions on this page:

http://www.nabble.com/Ruby-1.8.4-Mac-OS-X-readline-problems-t801880.html

$ curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
$ tar -xzf readline-5.1.tar.gz
$ cd readline-5.1
$ ./configure --prefix=/usr/local
$ make
$ sudo make install

Configuration and compilation seemed to go okay. However, the sudo make 
install output resulted in the following:


/bin/sh ./support/mkinstalldirs /usr/local/include \
/usr/local/include/readline /usr/local/lib \
/usr/local/info /usr/local/man/man3
for f in readline.h chardefs.h keymaps.h history.h tilde.h rlstdc.h 
rlconf.h rltypedefs.h; do \
/usr/bin/install -c -m 644 ./$f /usr/local/include/readline ; \
done
( if test -d doc ; then \
cd doc  \
make infodir=/usr/local/info DESTDIR= install; \
fi )
/bin/sh ../support/mkdirs /usr/local/info /usr/local/man/man3
if test -n  ; then \
/bin/sh ../support/mkdirs ; \
fi
if test -f readline.info; then \
/usr/bin/install -c -m 644 readline.info /usr/local/info/readline.info; \
else \
/usr/bin/install -c -m 644 ./readline.info /usr/local/info/readline.info; \
fi
if test -f rluserman.info; then \
/usr/bin/install -c -m 644 rluserman.info /usr/local/info/rluserman.info; \
else \
/usr/bin/install -c -m 644 ./rluserman.info 
/usr/local/info/rluserman.info; \
fi
if test -f history.info; then \
/usr/bin/install -c -m 644 history.info /usr/local/info/history.info; \
else \
/usr/bin/install -c -m 644 ./history.info /usr/local/info/history.info; \
fi
if /bin/sh -c 'install-info --version' /dev/null 21; then \
install-info --dir-file=/usr/local/info/dir \
/usr/local/info/readline.info ; \
install-info --dir-file=/usr/local/info/dir \
/usr/local/info/history.info ; \
install-info --dir-file=/usr/local/info/dir \
/usr/local/info/rluserman.info ; \
else true; fi
/usr/bin/install -c -m 644 ./readline.3 /usr/local/man/man3/readline.3
/usr/bin/install -c -m 644 ./history.3 /usr/local/man/man3/history.3
if test -n  ; then \
if test -f readline.html; then \
/usr/bin/install -c -m 644 readline.html /readline.html; \
else \
/usr/bin/install -c -m 644 ./readline.html /readline.html; \
fi ; \
if test -f history.html; then \
/usr/bin/install -c -m 644 history.html /history.html; \
else \
/usr/bin/install -c -m 644 ./history.html /history.html; \
fi ; \
if test -f rluserman.html; then \

Re: [Wtr-general] A Question about Java applets

2007-02-26 Thread Bret Pettichord
Quang wrote:
 Is there any way of using watir with java applets? Or does anyone know of any 
 testing tool that could test java applets?
   
You'll need to use a Java GUI Testing tool, like Abbot or Marathon.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] OT: Test unit reporter project dead?

2007-02-26 Thread Bret Pettichord
Nick Sieger wrote:
 The other bit is that it will write its report files to 
 test/reports, unless you set the ENV variable CI_REPORTS to a 
 directory where they should be written. 
I didn't know to look here. I installed ci_reporter today and had to 
read the source to figure this out (I should have read my email first...)

It would be good to spell this out in the docs. Thanks very much Nick 
for this tool.

Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Button identification

2007-02-26 Thread Bret Pettichord
Simba wrote:
 Thanks Bret , Toady i have seen that limitation in Watir site , i did not 
 knew this limitation in Watir  and also i am new to Watir , I have another 
 question for you 

 For some page I used ie.show_all_objects in CMD , it has given ouput 
 something like this
 HTML Docuemnt name=Quickwatch id=quickwatch 
 src=http://10.20.1.214:80/mwp/servlet/workspace/quickwatch?action=loadRES=1024X768

 I am not able to see objects and its properties of this document, Can you 
 please tell how to resolve this problem.
I don't understand your question.

Bret

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Test Data Cleanup/Reset Database in a .bat between tests

2007-02-26 Thread Jason
I have numerous TC methods within a class.  Before I execute the script, I have 
a batch file (C:\mybatchfile.bat) I run that basically resets the database and 
then performs some inserts for database setup.  The test data and scripts I am 
creating are using the same data.  

For example, I have a positive path TC that creates a user with the following 
fields: 
TC#1
Name- Jim Dandy
UN- jdandy
Email: [EMAIL PROTECTED]

The next is a negative path TC that checks that user names must be unique:
TC#2
Name- Jim Dandy
UN- jdandy
Email: [EMAIL PROTECTED]

Name- Jane Dandy
UN- jdandy
Email: [EMAIL PROTECTED]

They work if these tests are run individually.  However, when I run the class, 
they fail, since the TC#1 already created the user jdandy.

So, how can I call this batch file in between each TC, with the batch file 
completing before starting TC#2?

TIA, 
Jason
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6700messageID=19241#19241
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Nested Frames

2007-02-26 Thread Akhil Mehra
Cheers Thanks for your help.
 
Akhil

 Bret Pettichord [EMAIL PROTECTED] Tuesday, 27 February 2007 11:36 a.m. 
Akhil Mehra wrote:
 No the applications is currently hosted on the same server.  I get the 
 following error when clicking on a link from one frame which inter 
 updates another frame. 
  
 Exception: unknown property or method `readyState'
 HRESULT error code:0x80070005
   Access is denied.
I've also seen these errors in an app that does not use frames. They 
have gone aways since we updated to use 1.5.1.1162 (which has yet to be 
released, but which you can build yourself).

Bret

___
Wtr-general mailing list
Wtr-general@rubyforge.org 
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] OT: Test unit reporter project dead?

2007-02-26 Thread Nick Sieger
On 2/26/07, Bret Pettichord [EMAIL PROTECTED] wrote:
 Nick Sieger wrote:
  The other bit is that it will write its report files to
  test/reports, unless you set the ENV variable CI_REPORTS to a
  directory where they should be written.
 I didn't know to look here. I installed ci_reporter today and had to
 read the source to figure this out (I should have read my email first...)

 It would be good to spell this out in the docs. Thanks very much Nick
 for this tool.

Yeah, sorry about that.  I rushed writing the docs a little bit
because I wanted to get the first release out the door and forgot to
mention this.   The docs contains this information now.

Thanks,
/Nick
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Button identification

2007-02-26 Thread Chris McMahon
That's a frame.  You need to do something like

frame(:name, 'Quickwatch').show_all_objects

On 2/22/07, Simba [EMAIL PROTECTED] wrote:
 Thanks Bret , Toady i have seen that limitation in Watir site , i did not 
 knew this limitation in Watir  and also i am new to Watir , I have another 
 question for you

 For some page I used ie.show_all_objects in CMD , it has given ouput 
 something like this
 HTML Docuemnt name=Quickwatch id=quickwatch 
 src=http://10.20.1.214:80/mwp/servlet/workspace/quickwatch?action=loadRES=1024X768

 I am not able to see objects and its properties of this document, Can you 
 please tell how to resolve this problem.
 -
 Posted via Jive Forums
 http://forums.openqa.org/thread.jspa?threadID=6647messageID=19116#19116
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Can Watir be paused resumed manually when running test cases?

2007-02-26 Thread Jason He
Hi,

 

I want add the pause/resume feature into the watir testing, rather than
interrupt it and restart the whole testing process.

 

Please anybody tell me if it is possible, or is there such solution on
hand already.

 

Thanks

Jason

 

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Test Data Cleanup/Reset Database in a .bat between tests

2007-02-26 Thread Paul Carvalho

I think you might be interested in the 'setup' and 'teardown' methods.  Read
through the ruby-doc.org page on the Test:Unit module.

On 26/02/07, Jason [EMAIL PROTECTED] wrote:


I have numerous TC methods within a class.  Before I execute the script, I
have a batch file (C:\mybatchfile.bat) I run that basically resets the
database and then performs some inserts for database setup.  The test data
and scripts I am creating are using the same data.



[snip]

So, how can I call this batch file in between each TC, with the batch file

completing before starting TC#2?

TIA,
Jason

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Installing FireWatir on Intel Mac OS X Tiger (Intel)

2007-02-26 Thread Angrez Singh

Hi Christopher,

I appreciate your efforts to test FireWatir on Mac.
I am still not able to get why it is not working, if you are able to connect
to JSSh?

Do you get any errors on JavaScript console of Firefox because as per
testing with Dave Hoover the xpi was not getting installed properly on
Firefox 2.x because its an Firefox 1.5.x xpi. Also some files are missing in
the xpi that you installed (jssh.jar) file is missing some files? Could you
try the other version of XPI file i.e.:

http://people.mozilla.org/~davel/jssh/jssh-20060621-Darwin.xpihttp://people.mozilla.org/%7Edavel/jssh/jssh-20060621-Darwin.xpi

this file contains the correct jssh.jar file.

Let me know how it goes? But once you are connected to jssh it should work.

Can you just manually try sending some javascript commands on the jssh shell
to which you are connected?

Regards,

On 2/27/07, Christopher Rasch [EMAIL PROTECTED] wrote:


Hi,



I'm trying to get FireWatir 1.0.1 installed and working on Mac OS X
Tiger (Intel), v. 10.4.8. However, the unittests won't run, and when I
try to debug, I'm getting what appear to be errors related to my
readline installation. I'm documenting the process at my blog:

http://crasch.livejournal.com/522657.html

I've also copied the blog entry below. Anyone have any suggestions for
what to try next? Thanks!

Chris

About my setup:

Firefox 2.0.0.2
Mac OS X 10.4.8 (Intel)
XCode 2.4.1


Here's what I've done so far:

* Download and install Firefox.

* Install the jssh extension. You can find it here:

http://people.mozilla.org/~davel/jssh/jssh-20060622-Darwin.xpi

To install it, double-click on the link above.

* Start Firefox manually with the jssh extension as follows:

$ cd /Applications/Firefox.app/Contents/MacOS

$ ./firefox -jssh 

* If the jssh installation works, you should be able to telnet to port
9997:

$ telnet localhost 9997
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to the Mozilla JavaScript Shell!

* Install the firewatir gem. You can find the gem here:

http://code.google.com/p/firewatir/downloads/list

Once you've downloaded it, cd to the download directory and install as
follows:

$ cd ~/Desktop
$ sudo gem install --local firewatir-1.0.1-mswin32.gem

You should see:

Password:
Successfully installed firewatir, version 1.0.1
Installing ri documentation for firewatir-1.0.1-mswin32...
Installing RDoc documentation for firewatir-1.0.1-mswin32...

* To test that the unittests have run successfully, go to the unit tests
directory in the firewatir gem install. Run ruby mozilla_all_tests.rb
to run the unit test cases.

$ ruby mozilla_all_tests.rb
Loaded suite mozilla_all_tests
Started

[At this point, the script just hangs and does nothing until you
interrupt it. I tried to run it with ruby-debug, by adding the following
line to setup.rb:

require 'ruby-debug'
debugger

However, when I ran it again, I got the following error:

crasch2:/usr/local/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32
/unittests
crasch$ ruby mozilla_all_tests.rb
dyld: NSLinkModule() error
dyld: Symbol not found: _rl_filename_completion_function
Referenced from: /usr/local/lib/ruby/1.8/i686-darwin8.8.1/readline.bundle
Expected in: flat namespace

Trace/BPT trap

A search for the error message suggests that there is a problem with my
readline installation. Readline is installed on my machine via ports:

$ port installed
The following ports are currently installed:
...
readline @5.1.004_0 (active)
...

Next I tried to rebuild readline per the instructions on this page:

http://www.nabble.com/Ruby-1.8.4-Mac-OS-X-readline-problems-t801880.html

$ curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
$ tar -xzf readline-5.1.tar.gz
$ cd readline-5.1
$ ./configure --prefix=/usr/local
$ make
$ sudo make install

Configuration and compilation seemed to go okay. However, the sudo make
install output resulted in the following:


/bin/sh ./support/mkinstalldirs /usr/local/include \
/usr/local/include/readline /usr/local/lib \
/usr/local/info /usr/local/man/man3
for f in readline.h chardefs.h keymaps.h history.h tilde.h rlstdc.h
rlconf.h rltypedefs.h; do \
/usr/bin/install -c -m 644 ./$f /usr/local/include/readline ; \
done
( if test -d doc ; then \
cd doc  \
make infodir=/usr/local/info DESTDIR= install; \
fi )
/bin/sh ../support/mkdirs /usr/local/info /usr/local/man/man3
if test -n  ; then \
/bin/sh ../support/mkdirs ; \
fi
if test -f readline.info; then \
/usr/bin/install -c -m 644 readline.info /usr/local/info/readline.info; \
else \
/usr/bin/install -c -m 644 ./readline.info /usr/local/info/readline.info;
\
fi
if test -f rluserman.info; then \
/usr/bin/install -c -m 644 rluserman.info /usr/local/info/rluserman.info;
\
else \
/usr/bin/install -c -m 644 ./rluserman.info
/usr/local/info/rluserman.info; \
fi
if test -f history.info; then \
/usr/bin/install -c -m 644 history.info /usr/local/info/history.info; \
else \

Re: [Wtr-general] Test Data Cleanup/Reset Database in a .bat between tests

2007-02-26 Thread Chris McMahon
 They work if these tests are run individually.  However, when I run the 
 class, they fail, since the TC#1 already created the user jdandy.

 So, how can I call this batch file in between each TC, with the batch file 
 completing before starting TC#2?

You might consider making a direct database connection via ODBC or DBI
in order to issue a DELETE 'jdandy' FROM users SQL command.  Also,
look into using setup() and teardown() methods in test/unit.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] TextField#set and utf-8

2007-02-26 Thread Bret Pettichord
See http://jira.openqa.org/browse/WTR-71 for comments on how to support Chinese.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6674messageID=19265#19265
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general