Re: [Wtr-general] Does Sending Keys work on windows 2003 server OS?

2007-07-09 Thread Bach Le
From what I've seen, send keys works just fine in Windows Server 2003.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] IE.new_process hangs my program

2007-06-27 Thread Bach Le
Shawn, I've seen this happen before on some machines that I have. I think this 
could be a result of the remote procedure call priority being set too low. I'm 
not sure what the fix is but the problem itself exists.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Our contribution to Watir

2007-06-15 Thread Bach Le
Hello all, 

We've been working with Watir for a while now and sort of using watir was a 
browser driver for our monitoring product. Internally, there were monitoring 
directives/functions that we found useful in our proprietary monitoring 
language. I've reproduced these functions to be used with watir as we move to a 
more open platform.

The details can be found at  
[http://jira.openqa.org/browse/WTR-162|http://jira.openqa.org/browse/WTR-162] 

Please take a look and contribute any comments or code where you can. Any help 
would be appreciated.

Our view is that Watir is a useful tool in automated testing and we are trying 
to use that to develop a package that could be paired with Watir for 
performance testing. This contribution is only the beginning. We have more 
useful things that will be coming down the pipe and we look forward to 
contributing more in the future. 


Bach Le
Software Engineer
Webmetrics Inc.
[EMAIL PROTECTED]
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Bach Le
What I do is if I have to require a certain set of files repeatedly, I just 
place it in another .rb file and require that .rb file which will in turn 
require all of the files you need.

So I would define a file called requirements.rb

and then inside that file place

require 'x'
require 'y'
require 'z'


and in the ruby script i'm running, put require 'requirements.rb' or something 
that way you don't require files you don't need
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-25 Thread Bach Le
I thought the two problems are related because in neither instance was watir 
able to find the window after it was created (I didn't look into the 
specifics). I did look into it some more after this post and I found out that 
it was Vista's security settings that caused watir to break. Turning off these 
security settings fixed it. I don't remember the details right now but as soon 
as I get my vista box up and running again, I will update the JIRA ticket and 
this thread with the details. I'm back on my old machine now which is running 
XP. I'll switch back a little later in the day so I'll update in a few hours.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-25 Thread Bach Le
So here is how I fixed my problem:

1. Goto the Control Panel
2. Click on User Accounts
3. Click on User Accounts again
4. Select the account you are using
5. Click Turn User Account Control on or off
6. Turn User Account Control off

This allowed Shell.Application.Window to find the correct window when IE is 
created in a test.

Hope that helps everyone else. I'll update the JIRA ticket as well.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question about IE.new_process and Vista

2007-05-24 Thread Bach Le
I've installed watir 1165 and tried using IE.new_process on Windows Vista and 
in both tests and irb, IE.new_process fails. It fails after creating the window 
when it tries to get the process id from hwnd. 

I have a coworker who installed this on his Vista machine and it works fine. 


The problem is that Shell.Application.windows does not get all of the windows 
but just the ones that are browsing the file system so the IE windows do not 
show up in this list. It ends up doing in an infinite loop and never breaks out 
of it.


Does anyone have any idea how to fix this?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-24 Thread Bach Le
Bret, the problem actually exists for IE.new as well. I create a new IE window 
with IE.new and it creates the window but when I call the goto method to 
navigate to any page, a new IE window shows up and the navigation is done in 
that window.


I've updated the ticket to include this information.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] unknown property or method `readyState'

2007-04-18 Thread Bach Le
Hi Charley, 

I just installed 1165 today and I have noticed the same error that was 
mentioned in this thread. The error revolves around the following piece of code:


  documents_to_wait_for = [EMAIL PROTECTED]
  while doc = documents_to_wait_for.shift
  until doc.readyState == complete 
sleep 0.2; s.spin
  end

and specific the line that says doc.readyState. The page I am testing has lots 
of frames and this is possibly what is causing this error. It usually says 
'method_missing' when it executes this line and crashes the entire script. 

I've also only noticed it when the page I am testing is running a bit slow


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


[Wtr-general] IE.new_process question

2007-03-22 Thread Bach Le
I know that IE.new_process uses the CreateProcess method in kernel32.dll to 
create a new IE process. This same method allows the user to change the 
environment variables for this specific instance of IE (by setting parameter 7 
in the call to CreateProcess).


Does anyone know which environment variables are required when IE starts up and 
how I can set up the environment block to pass to CreateProcess? Thanks


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


Re: [Wtr-general] IE.new_process question

2007-03-22 Thread Bach Le
Nevermind. When creating IE through the CreateProcess method, IE will need to 
read the SystemRoot environment variable.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] http_error_checker on IE7

2007-03-14 Thread Bach Le
Charley and Paul, I'm running the latest gem and trying to use the navigation 
checker with IE7, however, the code that was committed does not work.

The get the following error:

 1) Error:
test_1(TestCase):
WIN32OLERuntimeError: navigator
OLE error code:80070005 in Unknown
  Access is denied.


HRESULT error code:0x80020009
  Exception occurred.
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1217:in 
`method_missing'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1217:in 
`check_for_http_error'

C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir/contrib/page_checker.rb:26
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1849:in `call'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1849:in 
`run_error_checks'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1849:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1849:in 
`run_error_checks'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1838:in `wait'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1692:in `goto'
http_errors.rb:12:in `test_1'


and the problem is on the following line:

n = self.document.invoke('parentWindow').navigator.appVersion


it appears that navigator is the missing method so this line throws and error. 
Do you guys know of any work around? Thanks.


-Bach
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6349messageID=19888#19888
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] http_error_checker on IE7

2007-03-14 Thread Bach Le
I just set up apache on my local machine and hit the localhost for a document 
that doesn't exist.


I played around with it some more after I posted that last message. I fired up 
IRB and issued the command that way and it worked. So i went back and ran my 
test and it works now. I don't know why it didn't work before. I'm gonna test 
it out on the 2003 machine again to see if i can pinpoint the problem.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6349messageID=19891#19891
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] http_error_checker on IE7

2007-03-14 Thread Bach Le
Paul, here are the steps i used to produce the problem

1. IRB
2. create new IE window which should goto about:blank
3. issue command ie.document.invoke('parentWindow').navigator.appVersion
4. I do not get the error
5. call ie.goto('http://localhost/doesnotexist.html') and I get a HTTP 404 not 
found in the browser
6. call ie.document.invoke('parentWindow').navigator.appVersion


This is where I get the error. It seems to work on every page except the error 
ones.

I get the following error: 

  1) Error:
test_1(TestCase):
WIN32OLERuntimeError: navigator
OLE error code:80070005 in Unknown
  Access is denied.


HRESULT error code:0x80020009
  Exception occurred.
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1216:in 
`method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1216:in 
`check_for_http_error'

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir/contrib/page_checker.rb:26
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1845:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1845:in 
`run_error_checks'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1845:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1845:in 
`run_error_checks'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1834:in `wait'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1162/./watir.rb:1688:in `goto'
http_error.rb:13:in `test_1'


for this script:

require 'rubygems'
require 'watir'
require 'test/unit'
require 'watir/contrib/page_checker'

include Watir

class TestCase  Test::Unit::TestCase
  def test_1
ie = IE.new
ie.add_checker(PageCheckers::NAVIGATION_CHECKER)
ie.goto('http://localhost/doesnotexist.html')
  end
end
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6349messageID=19893#19893
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] http_error_checker on IE7

2007-03-14 Thread Bach Le
Paul, 
do you know if it's possible to read the response headers from the server for a 
given page with IE? I've been looking around and I can't find any information 
on it. I'd be happy to write the code if someone can point me in the right 
direction.

-Bach
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6349messageID=19897#19897
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Problem automating Gmail

2007-03-13 Thread Bach Le
Hello all, 

I'm writing some tests to test gmail and I'm having a slight problem clicking 
on the menu items to the right in a gmail window. Below is the script I am 
using. The problem is that I want to click on the text that says Starred 
right beneath Inbox but no matter if I use span.click or 
span.fireEvent(onClick) the click does not trigger an event. 

require 'rubygems'
require 'watir'
require 'test/unit'
include Watir

class TestCase  Test::Unit::TestCase
def test_1
$IE0 = IE.new
$IE0.goto(www.gmail.com)
$IE0.text_field(:id, 'Email').set('enter_username_here')
$IE0.text_field(:id, 'Passwd').set('enter_password_here')
$IE0.button(:name, 'null').click

#Click on Starred
$IE0.frame(:name, main).frame(:name, v1).span(:id, 
ds_starred).click
end
end

Any help would be appreciated. Please fill in the username and password when 
running otherwise it wont work. Thanks.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6882messageID=19812#19812
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How to clear the cache of the browser?

2007-03-12 Thread Bach Le
Hi Paul,
  I actually came across a problem with the method I described above today. I 
was scripting a page for a customer and the problem with the cookies occured. I 
had no idea what was wrong until I remembered that you mentioned that the 
cookies were the source of your problems. So thanks, you saved me hours of 
debugging.


-Bach
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6796messageID=19764#19764
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How to clear the cache of the browser?

2007-03-08 Thread Bach Le
Swarma,

Actually, I believe keeping the cookies from writing to disk is a better 
solution than the one Paul is suggesting (using code to delete it). In IE7 
(don't know about 6 but I think it is possible). 

In IE7, do the following:

1. Tools - Internet Options
2. Click on the Privacy Tab
3. Click on the Advanced button
4. Check Override automatic cookie handling
5. Under First-Party Cookies, select Block
6. Under Third-Party Cookies, select Block
7. Check Always allow session cookies

This will keep the cookies in memory for as long as the browser is open and 
clears them when the browser is closed. Cookies are never written to disk so 
the data does not persist across multiple IE processes.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6796messageID=19696#19696
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] How to clear the cache of the browser?

2007-03-08 Thread Bach Le
Thanks for the info Paul. We are currently also doing some tests with clearing 
cookies and cache. I'll be sure to test it out to make sure it works in that 
situation.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6796messageID=19712#19712
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] bring_to_front for window without a title

2007-02-15 Thread Bach Le
I'm writing a test for a page that does not have a title. The IE window only 
has the url, however, IE.bring_to_front uses AutoIt's WinActivate function to 
bring the window to front but AutoIt can only bring a window to the front if a 
title is specified. Anyone know how I can do it?

I thought about sending Alt+Tab until IE.front? is true but looking at the 
front? code, it uses AutoIt again to check the page status via the title so 
dead end again.

P.S. This is not a page I own so I cannot simply add a title if you're thinking 
about fixing it that way.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6572messageID=18736#18736
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] bring_to_front for window without a title

2007-02-15 Thread Bach Le
I found out that you can do ie.document.focus and that brings the window to the 
front but that seems like a hackish way of doing it. Anyone know a better 
solution?
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6572messageID=18737#18737
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] bring_to_front for window without a title

2007-02-15 Thread Bach Le
Thanks Bret, I guess I'll go with that then.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6572messageID=18739#18739
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] bring_to_front for window without a title

2007-02-15 Thread Bach Le
Paul,
   I looked at the documentation for AutoIt but it seems like all of the 
functions rely on matching the titles in order to interact with the window. The 
only references that i saw for using HWND was the WinClose or something.


-Bach
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6572messageID=18747#18747
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Speed of Firewatir vs. Watir

2007-01-18 Thread Bach Le
Hi Angrez,
   Thanks for clarifying that. Although it does work on watir, do you have any 
idea why it doesn't work on FireWatir? Seems to be that would be nice to have 
both the relative path and the absolute path for the element src. If you'd 
like, i'd be happy to take a look at the code and perhaps come up with a 
solution. Thanks for your hard work.


-Bach
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6078messageID=17320#17320
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Speed of Firewatir vs. Watir

2007-01-17 Thread Bach Le
Hi Angrez,
   I just installed the latest gem, 1.0.1. I ran the same test again the script 
errors at this line:

$FF.button(:src, 
'http://www.anntaylor.com/Images/Global/placeitemsinbag.gif').click

I get the following error:

  1) Error:
test_1(TestCase):
FireWatir::Exception::UnknownObjectException: Unable to locate object, using 
src and http://www.anntaylor.com/Images/Global/placeitemsinbag.gif

C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:739:in
 `assert_exists'

C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:897:in
 `click'
FireWatir_AnnTaylor.rb:18:in `test_1'
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6078messageID=17256#17256
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] working with bitmap

2007-01-12 Thread Bach Le
try this

im = Image.new('C:\\Documents and Settings\\Administrator\\My Documents\\My 
Pictures\\SAI1.jpg')
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6089messageID=17113#17113
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Speed of Firewatir vs. Watir

2007-01-11 Thread Bach Le
Hi Angrez,
 I did not have any problems installing FireWatir. I followed the 
installation guide at http://code.google.com/p/firewatir/ and it worked like a 
charm. I tried to run a few scripts that I had successfully run with Watir and 
they seemed to break when it got to clicking buttons in forms. Other than that, 
it worked very well. Keep up the good work. I'd also like to help you guys out 
if you need it.


-Bach
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6078messageID=17058#17058
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] working with bitmap

2007-01-11 Thread Bach Le
I think he means checking if one image is the same as another image 
pixel-by-pixel and if that is the case, rmagick should be able to do the trick 
although I have not tested it out myself.

Message was edited by: 
beefandbachle
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6089messageID=17076#17076
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Managing the Cookie Space with Watir

2007-01-08 Thread Bach Le
Since no one seems to know, I think I have found a solution and I want to share 
with everyone just in case someone is having this problem.

In Internet Explorer 7, goto Internet Options-Privacy-Advanced.

Block First and Third Party cookies, however, enable session cookies. These 
cookies will stay in memory as long as the IE process is open. Cookies are 
never written to disk. The cookie space seemed, in my tests, separate from 
other IE processes are are running. For example, if I logged in to yahoo mail 
or something with one IE window, and started up another IE instance, the 2nd 
instance is unaware that I am logged in with the first instance. 

Hope that helps other people.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6023messageID=16927#16927
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Managing the Cookie Space with Watir

2007-01-05 Thread Bach Le
I haven't had much time recently to work with watir but I have come across a 
problem I have not been able to figure out.

Here's an example of my problem:
1. I go to a web store
2. I place an item in the shopping cart
3. I finish the script and exit
4. When i run it again, the item may already be in the shopping cart and break 
the assumption that I have an empty shopping cart

I was wondering if anyone has come up with a solution to this problem. Ideally, 
IE should delete all cookies written during the session so that IE can start up 
new again when I run the script again otherwise the test will fail.

I read this page 
(http://rubyforge.org/pipermail/wtr-general/2005-March/001276.html) but I dont 
think the cookie spaces between the opened IE instances are separate. As far as 
I know, they all write to the same temporary internet files so cookies are 
shared between instances. Can anyone shed some light on this? Thanks.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6023messageID=16874#16874
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] spiderwatir!

2006-11-08 Thread Bach Le
This is very interesting news. Opens a whole new arena for functionality 
testing by allowing us to test even more rich web pages like those using flash, 
which if I'm not mistaken, is not possible with watir and difficult if not 
impossible with other technologies.

-Bach
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5140messageID=14309#14309
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] interacting with AJAX drag and drop

2006-08-08 Thread Bach Le
Max, check out this link

http://zbarzone.blogspot.com/2006/05/drag-and-drop-with-watir.html

-Bach

Message was edited by: 
beefandbachle
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=3397messageID=9494#9494
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir 1.5 Specifying Element in Form Error

2006-08-08 Thread Bach Le
Rand,

ie.button(:src, 
'https://www.entertainment.com/images/button_continue.gif').click 

should be enough to click the button, however, for consistency reasons there 
shouldn't be a reason why it works without the form specified when it is in 
fact a form element. As I noted before, it does work in 1.4.1 and it is not 
only more explicit and clear when using it with form included, it is logical 
and intuitive.

I took your suggestion and tried it with image instead of button and 
unfortunately it does not work. I tried both with ie.form(:name, ...).image and 
just ie.image.

Thanks for replying, I didn't even think about using image but in this case, 
it didnt work.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=3381messageID=9501#9501
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir 1.5 Specifying Element in Form Error

2006-08-08 Thread Bach Le
Thanks Charley.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=3381messageID=9511#9511
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Watir 1.5 Specifying Element in Form Error

2006-08-07 Thread Bach Le
I was running the latest stable release of Watir 1.4 but had the window 
attach error which was fixed with version 1.5 development build but 
after I installed 1.5, I can no longer specify a specific element within 
a form such as:

ie.form(:id, form1).button(:src, http://www;).click


Was this feature removed from version 1.5? How would you select a 
certain button in a page that has two forms and the buttons are 
identical. I think that being able to specify a button by the form 
object is a lot clearer than specifying the button by index.

Thanks.


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


Re: [Wtr-general] Watir 1.5 Specifying Element in Form Error

2006-08-07 Thread Bach Le
Thanks for getting back to me so quickly.

Here is an example of it working in 1.4.1 and not in the 1.5 development build.

ie = IE.new
ie.goto(www.entertainment.com)
ie.link(:text, 'Buy the Book').click
ie.link(:text, 'Chicago North (2007)').click
ie.image(:index, '4').click
ie.button(:name, 'checkout').click
ie.form(:name, 'shipaddress').button(:src, 
'https://www.entertainment.com/images/button_continue.gif').click

I was testing this on the entertainment.com website with the above watir code 
and it is working correctly in 1.4.1 by clicking the right button, however, in 
1.5, i get the following error message:

Output for 1.5

  1) Error:
test_1(TestCase):
Watir::Exception::UnknownObjectException: Unable to locate object, using src 
and https://www.entertainment.com/images/button_continue.gif
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:2267:in 
`assert_exists'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:2405:in `click'
test.rb:15:in `test_1'


Output for 1.4.1

ruby test.rb
Loaded suite test
Started
.
Finished in 21.531 seconds.

1 tests, 0 assertions, 0 failures, 0 errors
Exit code: 0



By the way, there is only one form on the page though I'm not sure that should 
make a difference.


I'll log the bug in JIRA as well. Thanks.


-Bach
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=3381messageID=9425#9425
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general