Send Wtr-general mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://rubyforge.org/mailman/listinfo/wtr-general
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Wtr-general digest..."
Today's Topics:
1. Re: how to check security alert box before clicking it (Amit)
2. Re: Anyone using Ruby CruiseControl? (Derek Wong)
3. Receiving extensive warning messages while trying to run
Watir Ruby scripts (Lavanya Lakshman)
4. Recovery System in WATIR (Lavanya Lakshman)
5. ruby2exe and autoit (mihai)
6. click with autoit on OK button (mihai)
7. general questions when trying Watir (salamond)
8. Re: general questions when trying Watir ( ?eljko Filipin )
9. Re: Recovery System in WATIR (Paul Rogers)
10. How do I attach to a "mailto" window (marty)
----------------------------------------------------------------------
Message: 1
Date: Wed, 04 Jul 2007 11:50:51 CDT
From: Amit <[EMAIL PROTECTED]>
Subject: Re: [Wtr-general] how to check security alert box before
clicking it
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
I resolved the problem. actually we have to check for the getWindowHandle("Security Alert") in a loop. first time it didn't find the window.
The code i used is -
* begin*
* wc = WinClicker.new*
* hwnd = wc.getWindowHandle("Security Alert")*
* if(hwnd == -1) then*
* num = 0*
* while( num < 1)*
* hwnd = wc.getWindowHandle("Security Alert")*
* num = num + 1*
* end*
* end*
* if(hwnd != -1) then*
* wc.clearSecurityAlertBox()*
* startAction "Recived Security Alert", " Click 'Yes' button"*
* logPass*
* else*
* startAction "No Security Alert", "No Action"*
* logPass*
* end*
* rescue => e*
* startAction "Security Alert throws exception", "Exception for Security Alert window"*
* handleFail e*
* end*
Now its working. If security Alert window is not present it will not call *wc.clearSecurityAlertBox()* function .
Thanks,
Amit
------------------------------
Message: 2
Date: Thu, 05 Jul 2007 14:43:18 +1200
From: "Derek Wong" <[EMAIL PROTECTED]>
Subject: Re: [Wtr-general] Anyone using Ruby CruiseControl?
To: <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII
Thanks to those out there who gave suggestions.
In the end I've just parallel installed Ruby 1.8.2 and 1.8.5. I now have CCRB running under RB 1.8.5 and my Web tests running against Ruby 1.8.2/WATIR 1.5.1.1192. I've now explicitly path to the 1.8.2 install of Ruby to execute my web tests. This seems to work fine and the dashboard now appears as expected.
Not an optimal solution but definitely workable, now I just need to get the ci_reporter XML files processed into something that CCRB can display.
Regards,
Derek.
"Richard Conroy" <[EMAIL PROTECTED]> 5/07/2007 2:31 a.m. >>>
On 7/4/07, Derek Wong <[EMAIL PROTECTED]> wrote:
Hi folks,
here's the situation. I have the following installed:
ruby 1.8.2 (2004-12-25) [i386-mswin32]
WATIR 1.5.1.1192
win32-process 0.5.0
windows-pr 0.6.6
rake 0.7.3
rails 1.2.3
cruisecontrolrb 1.1.0 (CCRB from now on)
However, some of my tests are testing IE modal dialogs. From my understanding of the recent thread in this group about the best combination of Ruby and Watir if I'm to test modal dialogs I'm limited to using Ruby 1.8.2 and no later. So that would preclude me from using CruiseControl right?
So, is there a way around any of this?
Any way of running 2 different ruby interpreters together like this?
Perhaps running Ruby 1.8.2 as a shell, or using explicit path information
to the 1.8.2 ruby binaries?
------------------------------
Message: 3
Date: Wed, 04 Jul 2007 22:38:28 CDT
From: Lavanya Lakshman <[EMAIL PROTECTED]>
Subject: [Wtr-general] Receiving extensive warning messages while
trying to run Watir Ruby scripts
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
I have installed 1.8.5 version of ruby along with 1.4.1 version of Watir before and didnt have any issues, until recently I was required to have a completely new setup on a different machine.
Ruby I have installed from (http://rubyforge.org/frs/?group_i d=167) 1.8.25-21 version.
While running any of the Watir scripts, I am receiving the following warning messages:
E:\PROVIS>GlobalAdminScript.rb
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1039: warning: already ini
tialized constant REVISION
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1042: warning: already ini
tialized constant VERSION
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1045: warning: already ini
tialized constant READYSTATE_COMPLETE
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1048: warning: already ini
tialized constant DEFAULT_TYPING_SPEED
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1051: warning: already ini
tialized constant DEFAULT_SLEEP_TIME
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1054: warning: already ini
tialized constant DEFAULT_HIGHLIGHT_COLOR
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1901: warning: already ini
tialized constant TO_S_SIZE
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2217: warning: already ini
tialized constant TAG
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2225: warning: already ini
tialized constant TAG
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2232: warning: already ini
tialized constant TAG
------------------------------
Message: 4
Date: Wed, 04 Jul 2007 22:43:29 CDT
From: Lavanya Lakshman <[EMAIL PROTECTED]>
Subject: [Wtr-general] Recovery System in WATIR
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
Hi All,
Whenever we consider any tool for automation, the first and the foremost critical part is the recovery system.
Unfortunately I didn't get much info related to this on the website.
I would appreciate your thoughts and experience related to this.
Thanks and Regards,
Lavanya Lakshman
------------------------------
Message: 5
Date: Thu, 05 Jul 2007 01:52:20 CDT
From: mihai <[EMAIL PROTECTED]>
Subject: [Wtr-general] ruby2exe and autoit
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
i have a script in wich im using an autoit control:
$autoit= WIN32OLE.new("AutoItX3.Control")
i want to test my script on another PC; so im making an exe with ruby2exe for my script and when im executing the .exe on another PC im getting this error:
C:\DOCUME~1\QA_BLA~1\eee\eee.test.exe.2\app\test.rb:9:in `initia
lize': unknown OLE server: `AutoItX3.Control' (WIN32OLERuntimeError)
HRESULT error code:0x800401f3
Invalid class string from C:\DOCUME~1\QA_BLA~1\eee\eee.test.e
xe.2\app\test.rb:9:in `new'
from C:\DOCUME~1\A_BLA~1\eee\eee.test.exe.2\app\blazent_test.rb
:9
from C:\DOCUME~1\A_BLA~1\eee\eee.test.exe.2\bootstrap.rb:77:in
`load'
from C:\DOCUME~1\A_BLA~1\eee\eee.test.exe.2\bootstrap.rb:77
i have try to copy AutoItX3.dll in the directory where the .exe is or in windows/system32 but the error still appears.
What can i do?
------------------------------
Message: 6
Date: Thu, 05 Jul 2007 06:13:57 CDT
From: mihai <[EMAIL PROTECTED]>
Subject: [Wtr-general] click with autoit on OK button
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
i have this code:
$ie1.radios.each do |chk|
chk.focus
if $ie1.button(:index,2).exist?
then
$autoit.BlockInput(1)
$ie1.button(:index,2).click
$autoit.Send("{Enter}")
$autoit.BlockInput(0)
end
button(:index,2) is a remove button and it shoul remove the selected radio; the problem is that when i want to remove that radio a small window appears with title Microsoft Internet Explorer and with 2 buttons OK and CANCEL for remove item; the OK button is selected so all i have to do is to send ENTER key with autoit, but that small window blocks my script (wont execute the next command SEND({ENTER})) untill a button will be pressed.
Also i cant work with the main window unless the small window is closed.
How can i press the OK button? How can the script execute SEND command and not pause untill the small window will be close?
------------------------------
Message: 7
Date: Thu, 5 Jul 2007 19:44:47 +0800
From: salamond <[EMAIL PROTECTED]>
Subject: [Wtr-general] general questions when trying Watir
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
We are trying to find some tools to help us in web automation testing.
Selenium WET Watir are all reviewed.
Finally we choose Watir 'coz it's pure scriptable.
Using Selenium and WET will make our scripts highly rely on IDE,
which is not what we want to.
But there's several problems these days really puzzled me.
I tried to search the archive mail list. But didn't find anything useful.
Q1: how do you write your scripts?
If I want to set my username & passwd in a login form's text_field,
is there any other way except for dig into the html to see what the name of
text_filed is?
Q2: Working with Ajax sometimes, I can't even find the object in
VIEW/source.
does watir support Ajax testing? will it work with several web sites like
igoogle or liferay?
Q3: I can't have attach work properly for me.
if i got a link like this :
<a href="" class="moz-txt-link-rfc2396E" href="http://www.google.com">"http://www.google.com" target="_blank">.
and ie is my current page driver.
ie2= Watir::IE.attach(:url,'http://www.google.com')
if i did this, will the link in ie be clicked and a new window generated?
According to the User Guide, I think it should be the right way to work.
But i tried several times, it didn't work. seems it can't find the
object with url "www.google.com".
anybody know what's going wrong ?
thanks
Jaordzz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070705/e94a90d1/attachment-0001.html
------------------------------
Message: 8
Date: Thu, 5 Jul 2007 14:30:40 +0200
From: " ?eljko Filipin " <[EMAIL PROTECTED]>
Subject: Re: [Wtr-general] general questions when trying Watir
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="utf-8"
Hi Jaordzz,
Comments are inline.
On 7/5/07, salamond <[EMAIL PROTECTED]> wrote:
Q1: how do you write your scripts?
If I want to set my username & passwd in a login form's text_field,
is there any other way except for dig into the html to see what the name
of text_filed is?
I use Firebug (https://addons.mozilla.org/en-US/firefox/addon/1843) for
Firefox, but there is also Internet Explorer Developer Toolbar (
http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en
)
Q2: Working with Ajax sometimes, I can't even find the object in
VIEW/source.
does watir support Ajax testing? will it work with several web sites like
igoogle or liferay?
Yes. If you have a problem with something, let us know.
Q3: I can't have attach work properly for me.
if i got a link like this :
<a href="" class="moz-txt-link-rfc2396E" href="http://www.google.com">"http://www.google.com" target="_blank">.
and ie is my current page driver.
ie2= Watir::IE.attach(:url,'http://www.google.com' <http://www.google.com%27>)
if i did this, will the link in ie be clicked and a new window generated?
Try this.
ie.link(:href, "http://www.google.com").click
Zeljko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070705/c14b39ea/attachment-0001.html
------------------------------
Message: 9
Date: Thu, 05 Jul 2007 08:15:50 -0600
From: Paul Rogers <[EMAIL PROTECTED]>
Subject: Re: [Wtr-general] Recovery System in WATIR
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
reply-type=original
what are you trying to recover from?
----- Original Message -----
From: "Lavanya Lakshman" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, July 04, 2007 9:43 PM
Subject: [Wtr-general] Recovery System in WATIR
Hi All,
Whenever we consider any tool for automation, the first and the foremost
critical part is the recovery system.
Unfortunately I didn't get much info related to this on the website.
I would appreciate your thoughts and experience related to this.
Thanks and Regards,
Lavanya Lakshman
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
------------------------------
Message: 10
Date: Thu, 05 Jul 2007 09:25:02 CDT
From: marty <[EMAIL PROTECTED]>
Subject: [Wtr-general] How do I attach to a "mailto" window
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
In the HTML code I have a link with a href of mailto. When I click on it in Watir, it brings up a window for the email message. I would like to attach to that window just to verify that the link worked properly. How do I do this?
Html code:
<a href="" class="moz-txt-link-abbreviated" href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]'>xxx</a>
Watir code so far:
ie.link(:text, /xxx/).click
ie1=IE.attach(:url, /????/) <--- Need HELP here
------------------------------
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
End of Wtr-general Digest, Vol 44, Issue 4
******************************************