require 'watir'
require 'rubygems'
require 'win32ole'
autoit = WIN32OLE.new('AutoItX3.Control')
autoit.ControlClick("[Class:#32770]","","Button1")
In this example I used the controlclick function which is an autoit
function. Once you assign win32ole.new to autoit control, when you
call autoit, it utlises the function library in autoit. You can refer
to the autoit help in order to get the functions and what they do.
for more info check out this link in relation to javascript popups
with autoit.
http://justaddwatir.com/watir/?s=autoit
Sameh
> If for some reason one gets the error -
> `AutoItX3.Control' (WIN32OLERuntimeError), you can register this dll
> using regsvr32 to solve the issue.
> Go to the folder - C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.6\watir\
> and execute this from command prompt - regsvr32 AutoItX3.dll
>
I think this dll should be auto-registered during gem install. This
may be a bug. Can someone raise it in Jira?
Aidy
I just wanted to evaluate on basic terms as to whether watir can be used
extensively for testing a website (CMS) developed in Apache Wicket.
Thanks,
Hrishikesh Bose
"Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment."
www.cybage.com
On 29/08/2008, Hrishikesh Bose <hrish...@cybage.com> wrote:
>
> Hi all,
>
> I just wanted to evaluate on basic terms as to whether watir can be used
> extensively for testing a website (CMS) developed in Apache Wicket.
>
> Thanks,
> Hrishikesh Bose
Both Watir and FireWatir exercise the browsers' DOM. This means any
technology can be tested if the end stack is a browser display.
Aidy
I agree that this would be nice. However, gems do not allow you to run
scripts during install. So your suggested solution is not possible.
Instead, we register autoit on first usage. I think problems occur when
first usage is made by non-admin, in which case the registration will fail.
One option would be to add a command that would do this registration and
then tell every user to run this command after installing the Watir gem.
Any one interested in writing such a command?
Bret
On 29/08/2008, Bret Pettichord <br...@pettichord.com> wrote:
>
> Aidy,
>
> One option would be to add a command that would do this registration and
> then tell every user to run this command after installing the Watir gem.
> Any one interested in writing such a command?
Do you mean a batch file?
Aidy
Bret
Paul