This isn't meant as an RTM email, but most people will find pretty much every thinkable scenario for using WATiR has test cases in the Unit tests.

If you simply navigate to where you have WATiR installed, there is a unittests directory that contains examples of calling _javascript_ that pops input dialogs and automatically closing them with an Ok or Cancel response...

I find that whenever I am stuck, those testcases show me the way...

Hope that helps... Specifically look at the _javascript__*.rb unit tests...  They cover exactly this question.

j.

On 10/4/05, Max Kononovich <[EMAIL PROTECTED]> wrote:

Hello,

 

Please, tell how I can start the separete process?

 

Thanks,

 

Max

 

Message: 8
Date: Mon, 03 Oct 2005 14:31:51 -0400
From: Alfred Whitehead
Subject: Re: [Wtr-general] Buttons on the confirmation message
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=KOI8-R; format=flowed

Hi Max,

I have played with something similar to this in the past. I found that,
when linked up to IE, the whole process that your script is running in
will become blocked when a _javascript_ pop-up appears. This seems to
affect all threads that are part of that process.

One possible solution would be to spawn a separate process to run
myclicker.rb. There may well be a better solution (and I would enjoy
seeing it too!).

Alf

Max Kononovich wrote:

>Hello
>
>I'll try the algorithm below. But it seems ! that nohig
>happens. I mean the comfirmation message appeares
>however $helper doesn't click on the button. Please,
>tell if you know the solution.
>
>Thanks,
>
>Max
>
>
>
>>Hi Max,
>>
>>Try this out like this:
>>
>># This you should write in the script
>>Thread.new { system("rubyw myclicker.rb") }
>>$ie.link(:url, /menu_delete/).click
>>
>>Now create a new file called myclicker.rb
>>require 'watir/WindowHelper'
>>$helper = WindowHelper.new
>>$helper.push_confirm_button_ok()
>>
>>Hope this helps,
>>
>>P.S.: You can change the name of the file from
>>myclicker.rb but make sure
>>both the names are same (the names shown in bold
>>text).
>>
>>Regards,
>>Angrez
>>
>>
>
>
>
>
>>
>
>________________________________________________________
>?? ??? ? Yahoo!?
>????????? ??????????? ? ??????????. Yahoo! ?????! http://ru.mail.yahoo.com
>_______________________________________________
>Wtr-general mailing list
> [email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>

--
Alf Whitehead [[EMAIL PROTECTED]] 416-214-4977 x260
Quality Assurance Specialist
Klick Communications, http://klick.com/



------------------------------

Message: 9
Date: Mon, 3 Oct 2005 17:32:57 -0500
From: Chris McMahon
Subject: [Wtr-general] OT: generate random text?
To: [email protected]
Message-ID:
<[EMAIL PROTECTED] >
Content-Type: text/plain; charset=ISO-8859-1

Hi...

I want to generate some random text for test purposes. "rand" doesn't
see! m to DWIM. Say, to pick an arbitrary letter from the uppercase
range A to Z.

[A-Z].rand
[A..Z].rand

seems right, but isn't.
-Chris



------------------------------

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general


End of Wtr-general Digest, Vol 23, Issue 2
******************************************

Вы уже с Yahoo!? Испытайте обновленную и улучшенную Yahoo! Почту!
http://ru.mail.yahoo.com


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general





--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to