Re: [wtr-general] Re: Handling Java script Popup with Ruby in WATIR

2013-04-10 Thread prashant sharma
error resolve now


On Thu, Apr 11, 2013 at 2:37 AM, Chuck van der Linden <
cvanderlin...@climate.com> wrote:

> Did you read the entire thread?
>
> When you say 'same error'  the same questions apply, such as 'are you
> using watir or watir-webdriver'
>
> and 'show us the code you are trying to use, indicate where the error
> occurs, and what the error message (if any) is'
>
>
>
> On Wednesday, April 10, 2013 1:13:04 AM UTC-7, prashant sharma wrote:
>>
>> same error? what is the solution of it.
>>
>> On Friday, June 1, 2012 2:14:01 PM UTC+5:30, AQUA wrote:
>>>
>>> Hi  Linden,
>>> I tried out the example from watir -webdriver but I m still getting the
>>> following error message:
>>>
>>> C:/Ruby187/lib/ruby/gems/1.8/**gems/selenium-webdriver-2.21.**
>>> 2/lib/selenium/webdriver/**remote/response.rb:52:in `assert_ok': Modal
>>> dialog present (Selenium::WebDriver::Error::**UnhandledAlertError)
>>> while following line is  executed
>>>
>>> *$browser.alert.exists?*
>>>
>>> On Friday, April 27, 2012 12:12:46 PM UTC+5:30, AQUA wrote:

 Hi All,

 I have been working on WATIR for sometimes, but finding issues in
 handling Java Script pop-ups.

 on the screen i m testing there is a on_click event. I tried AutoIt and
 some other examples avaliable on WATIR wiki at http://wiki.openqa.org/*
 *display/WTR/JavaScript+Pop+Ups

 Most of the examples work with click_no_wait statment. But when I use
 fire_event('onclick') the popup is generated the the execution halts till I
 manually click the pop-up button. This doesn't happens with click_no_wait.

 Can any one assist me on how can I work out a solution with fire_event
 as I also need to fire events like onblur, onhover, etc.


 Thanks and & Regards,
 Manav Gupta
 Bangalore.

>>>
>>> On Friday, April 27, 2012 12:12:46 PM UTC+5:30, AQUA wrote:

 Hi All,

 I have been working on WATIR for sometimes, but finding issues in
 handling Java Script pop-ups.

 on the screen i m testing there is a on_click event. I tried AutoIt and
 some other examples avaliable on WATIR wiki at http://wiki.openqa.org/*
 *display/WTR/JavaScript+Pop+Ups

 Most of the examples work with click_no_wait statment. But when I use
 fire_event('onclick') the popup is generated the the execution halts till I
 manually click the pop-up button. This doesn't happens with click_no_wait.

 Can any one assist me on how can I work out a solution with fire_event
 as I also need to fire events like onblur, onhover, etc.


 Thanks and & Regards,
 Manav Gupta
 Bangalore.

>>>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Watir General" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/watir-general/faCno-Nk8aE/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: Handling Java script Popup with Ruby in WATIR

2013-04-10 Thread Chuck van der Linden
Did you read the entire thread?

When you say 'same error'  the same questions apply, such as 'are you using 
watir or watir-webdriver'

and 'show us the code you are trying to use, indicate where the error 
occurs, and what the error message (if any) is'



On Wednesday, April 10, 2013 1:13:04 AM UTC-7, prashant sharma wrote:
>
> same error? what is the solution of it.
>
> On Friday, June 1, 2012 2:14:01 PM UTC+5:30, AQUA wrote:
>>
>> Hi  Linden,
>> I tried out the example from watir -webdriver but I m still getting the 
>> following error message:
>>
>> C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/response.rb:52:in
>>  
>> `assert_ok': Modal dialog present 
>> (Selenium::WebDriver::Error::UnhandledAlertError)
>> while following line is  executed
>>
>> *$browser.alert.exists?*
>>
>> On Friday, April 27, 2012 12:12:46 PM UTC+5:30, AQUA wrote:
>>>
>>> Hi All,
>>>
>>> I have been working on WATIR for sometimes, but finding issues in 
>>> handling Java Script pop-ups.
>>>
>>> on the screen i m testing there is a on_click event. I tried AutoIt and 
>>> some other examples avaliable on WATIR wiki at 
>>> http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
>>>
>>> Most of the examples work with click_no_wait statment. But when I use 
>>> fire_event('onclick') the popup is generated the the execution halts till I 
>>> manually click the pop-up button. This doesn't happens with click_no_wait.
>>>
>>> Can any one assist me on how can I work out a solution with fire_event 
>>> as I also need to fire events like onblur, onhover, etc.
>>>
>>>
>>> Thanks and & Regards,
>>> Manav Gupta
>>> Bangalore.
>>>
>>
>> On Friday, April 27, 2012 12:12:46 PM UTC+5:30, AQUA wrote:
>>>
>>> Hi All,
>>>
>>> I have been working on WATIR for sometimes, but finding issues in 
>>> handling Java Script pop-ups.
>>>
>>> on the screen i m testing there is a on_click event. I tried AutoIt and 
>>> some other examples avaliable on WATIR wiki at 
>>> http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
>>>
>>> Most of the examples work with click_no_wait statment. But when I use 
>>> fire_event('onclick') the popup is generated the the execution halts till I 
>>> manually click the pop-up button. This doesn't happens with click_no_wait.
>>>
>>> Can any one assist me on how can I work out a solution with fire_event 
>>> as I also need to fire events like onblur, onhover, etc.
>>>
>>>
>>> Thanks and & Regards,
>>> Manav Gupta
>>> Bangalore.
>>>
>>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: Handling Java script Popup with Ruby in WATIR

2013-04-10 Thread prashant sharma
same error? what is the solution of it.

On Friday, June 1, 2012 2:14:01 PM UTC+5:30, AQUA wrote:
>
> Hi  Linden,
> I tried out the example from watir -webdriver but I m still getting the 
> following error message:
>
> C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/response.rb:52:in
>  
> `assert_ok': Modal dialog present 
> (Selenium::WebDriver::Error::UnhandledAlertError)
> while following line is  executed
>
> *$browser.alert.exists?*
>
> On Friday, April 27, 2012 12:12:46 PM UTC+5:30, AQUA wrote:
>>
>> Hi All,
>>
>> I have been working on WATIR for sometimes, but finding issues in 
>> handling Java Script pop-ups.
>>
>> on the screen i m testing there is a on_click event. I tried AutoIt and 
>> some other examples avaliable on WATIR wiki at 
>> http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
>>
>> Most of the examples work with click_no_wait statment. But when I use 
>> fire_event('onclick') the popup is generated the the execution halts till I 
>> manually click the pop-up button. This doesn't happens with click_no_wait.
>>
>> Can any one assist me on how can I work out a solution with fire_event as 
>> I also need to fire events like onblur, onhover, etc.
>>
>>
>> Thanks and & Regards,
>> Manav Gupta
>> Bangalore.
>>
>
> On Friday, April 27, 2012 12:12:46 PM UTC+5:30, AQUA wrote:
>>
>> Hi All,
>>
>> I have been working on WATIR for sometimes, but finding issues in 
>> handling Java Script pop-ups.
>>
>> on the screen i m testing there is a on_click event. I tried AutoIt and 
>> some other examples avaliable on WATIR wiki at 
>> http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
>>
>> Most of the examples work with click_no_wait statment. But when I use 
>> fire_event('onclick') the popup is generated the the execution halts till I 
>> manually click the pop-up button. This doesn't happens with click_no_wait.
>>
>> Can any one assist me on how can I work out a solution with fire_event as 
>> I also need to fire events like onblur, onhover, etc.
>>
>>
>> Thanks and & Regards,
>> Manav Gupta
>> Bangalore.
>>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[wtr-general] Re: Handling Java script Popup with Ruby in WATIR

2012-06-01 Thread AQUA
Hi  Linden,
I tried out the example from watir -webdriver but I m still getting the 
following error message:

C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/response.rb:52:in
 
`assert_ok': Modal dialog present 
(Selenium::WebDriver::Error::UnhandledAlertError)
while following line is  executed

*$browser.alert.exists?*

On Friday, April 27, 2012 12:12:46 PM UTC+5:30, AQUA wrote:
>
> Hi All,
>
> I have been working on WATIR for sometimes, but finding issues in handling 
> Java Script pop-ups.
>
> on the screen i m testing there is a on_click event. I tried AutoIt and 
> some other examples avaliable on WATIR wiki at 
> http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
>
> Most of the examples work with click_no_wait statment. But when I use 
> fire_event('onclick') the popup is generated the the execution halts till I 
> manually click the pop-up button. This doesn't happens with click_no_wait.
>
> Can any one assist me on how can I work out a solution with fire_event as 
> I also need to fire events like onblur, onhover, etc.
>
>
> Thanks and & Regards,
> Manav Gupta
> Bangalore.
>

On Friday, April 27, 2012 12:12:46 PM UTC+5:30, AQUA wrote:
>
> Hi All,
>
> I have been working on WATIR for sometimes, but finding issues in handling 
> Java Script pop-ups.
>
> on the screen i m testing there is a on_click event. I tried AutoIt and 
> some other examples avaliable on WATIR wiki at 
> http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
>
> Most of the examples work with click_no_wait statment. But when I use 
> fire_event('onclick') the popup is generated the the execution halts till I 
> manually click the pop-up button. This doesn't happens with click_no_wait.
>
> Can any one assist me on how can I work out a solution with fire_event as 
> I also need to fire events like onblur, onhover, etc.
>
>
> Thanks and & Regards,
> Manav Gupta
> Bangalore.
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Handling Java script Popup with Ruby in WATIR

2012-05-02 Thread Chuck van der Linden
On Tuesday, May 1, 2012 9:41:43 PM UTC-7, AQUA wrote:
>
> Hello Bhavesh,
> thanks for your reply. I have been using AutoIt only to handle the 
> pop-ups. I guess I have not been able to make myself clear.
> Actually the issue I m facing is I have to javascript events, on oncClick 
> and other onBlur. For onClick I m using click_no_wait which works fine, i.e 
> the AutoIt component clicks the ok button in case there is  a pop-up.
>
> However, for onBlur event i m using fire_event('onBlur') available with 
> WATIR for firing the java script. The issue I m facing is when I use 
> fire_event, once the java script generates the pop-up, the execution gets 
> stuck untill I manually click the ok button, unlike as incase of 
> click_no_wait where once the pop-up is generated the execution flows to the 
> next statement that Handles the pop-up using AutoIt.
>
> Please assist.
>
> Thanks and Regards,
>
> Manav Gupta
>
> Try watir-webdriver, it has a different way (which might also be in 
watir3.0) of dealing with popups where you basically say "expect a popup to 
appear when I do this thing, when you see it click ok" (or whatever 
response you need such as yes or no etc) 

The code looks like this, where "browser.button(:value => 'Alert').click is 
the action that will cause the popup

  browser.alert do
browser.button(:value => 'Alert').click
  end #=> 'the alert message' 

 the comment "=> 'the alert message' refers to the fact that this block of 
code will return the message displayed in the alert (in case you need to 
verify it) of course in the example above it just goes in the bit bucket, 
but if you had put something like the_message = in front of browser.alert, 
then you would have that message in a variable you could use later.

For more details on other alert types see here: 
http://watirwebdriver.com/javascript-dialogs/

just keep in mind that you will need to replace the  code inside the do 
loop with whatever action you want to perform that will generate the alert


On Wednesday, May 2, 2012 1:58:08 AM UTC+5:30, Bhavesh wrote:
>>
>> If you have autoit installed, then you can create a small script which 
>> look for the window title and the button. 
>>
>> As soon as that titles window is there, it will clck the button. 
>>
>> Sample may be like : 
>>
>>  
>>
>> require 'win32ole' 
>>
>> begin 
>>   autoit = WIN32OLE.new('AutoItX3.Control') 
>>
>>  loop do 
>>sleep(30) 
>>autoit.ControlClick("Microsoft Office Outlook",'', 'OK') 
>>autoit.ControlClick("Security Information",'', '&Yes') 
>>autoit.ControlClick("Security Alert",'', '&Yes') 
>>sleep(20) 
>>
>>   end 
>>   Send("{SPACE}") 
>>
>>   rescue Exception => e 
>> puts e 
>>   end 
>>
>>  
>>
>> Have this script runing when you run your script. 
>>
>> Bhavesh 
>>
>> On Apr 30, 10:13 am, Chuck van der Linden  wrote: 
>> > consider moving to watir-webdriver perhaps? 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > On Sunday, April 29, 2012 10:19:33 PM UTC-7, AQUA wrote: 
>> > 
>> > > No I have been using, WATIR. And the issue I m facing is; basically I 
>> have 
>> > > been able to handle the popup using some of the examples available on 
>> WATIR 
>> > > wiki. But only with click_no_wait. Whenever I use fire_event the the 
>> > > javascript is executed but the execution flow stuck until I manually 
>> click 
>> > > the ok button. Hence the flow never enters the section of the code 
>> that is 
>> > > used for handling pop-up without manual interference. 
>> > 
>> > > Thanks & Regards, 
>> > > Manav 
>> > 
>> > > On Friday, April 27, 2012 1:37:34 PM UTC+5:30, Željko Filipin wrote: 
>> > 
>> > >> On Fri, Apr 27, 2012 at 8:42 AM, AQUA  
>> wrote: 
>> > >> > I have been working on WATIR for sometimes, but finding issues in 
>> > >> handling Java Script pop-ups. 
>> > 
>> > >> If you are using watir-webdriver, this could help: 
>> > 
>> > >>http://watirwebdriver.com/javascript-dialogs/ 
>> > 
>> > >> Željko 
>> > >> -- 
>> > >> watir.com/book - author
>
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Handling Java script Popup with Ruby in WATIR

2012-05-01 Thread AQUA
Hello Bhavesh,
thanks for your reply. I have been using AutoIt only to handle the pop-ups. 
I guess I have not been able to make myself clear.
Actually the issue I m facing is I have to javascript events, on oncClick 
and other onBlur. For onClick I m using click_no_wait which works fine, i.e 
the AutoIt component clicks the ok button in case there is  a pop-up.

However, for onBlur event i m using fire_event('onBlur') available with 
WATIR for firing the java script. The issue I m facing is when I use 
fire_event, once the java script generates the pop-up, the execution gets 
stuck untill I manually click the ok button, unlike as incase of 
click_no_wait where once the pop-up is generated the execution flows to the 
next statement that Handles the pop-up using AutoIt.

Please assist.

Thanks and Regards,

Manav Gupta

On Wednesday, May 2, 2012 1:58:08 AM UTC+5:30, Bhavesh wrote:
>
> If you have autoit installed, then you can create a small script which 
> look for the window title and the button. 
>
> As soon as that titles window is there, it will clck the button. 
>
> Sample may be like : 
>
>  
>
> require 'win32ole' 
>
> begin 
>   autoit = WIN32OLE.new('AutoItX3.Control') 
>
>  loop do 
>sleep(30) 
>autoit.ControlClick("Microsoft Office Outlook",'', 'OK') 
>autoit.ControlClick("Security Information",'', '&Yes') 
>autoit.ControlClick("Security Alert",'', '&Yes') 
>sleep(20) 
>
>   end 
>   Send("{SPACE}") 
>
>   rescue Exception => e 
> puts e 
>   end 
>
>  
>
> Have this script runing when you run your script. 
>
> Bhavesh 
>
> On Apr 30, 10:13 am, Chuck van der Linden  wrote: 
> > consider moving to watir-webdriver perhaps? 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Sunday, April 29, 2012 10:19:33 PM UTC-7, AQUA wrote: 
> > 
> > > No I have been using, WATIR. And the issue I m facing is; basically I 
> have 
> > > been able to handle the popup using some of the examples available on 
> WATIR 
> > > wiki. But only with click_no_wait. Whenever I use fire_event the the 
> > > javascript is executed but the execution flow stuck until I manually 
> click 
> > > the ok button. Hence the flow never enters the section of the code 
> that is 
> > > used for handling pop-up without manual interference. 
> > 
> > > Thanks & Regards, 
> > > Manav 
> > 
> > > On Friday, April 27, 2012 1:37:34 PM UTC+5:30, Željko Filipin wrote: 
> > 
> > >> On Fri, Apr 27, 2012 at 8:42 AM, AQUA  
> wrote: 
> > >> > I have been working on WATIR for sometimes, but finding issues in 
> > >> handling Java Script pop-ups. 
> > 
> > >> If you are using watir-webdriver, this could help: 
> > 
> > >>http://watirwebdriver.com/javascript-dialogs/ 
> > 
> > >> Željko 
> > >> -- 
> > >> watir.com/book - author

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Handling Java script Popup with Ruby in WATIR

2012-05-01 Thread Bhavesh
If you have autoit installed, then you can create a small script which
look for the window title and the button.

As soon as that titles window is there, it will clck the button.

Sample may be like :



require 'win32ole'

begin
  autoit = WIN32OLE.new('AutoItX3.Control')

 loop do
   sleep(30)
   autoit.ControlClick("Microsoft Office Outlook",'', 'OK')
   autoit.ControlClick("Security Information",'', '&Yes')
   autoit.ControlClick("Security Alert",'', '&Yes')
   sleep(20)

  end
  Send("{SPACE}")

  rescue Exception => e
puts e
  end



Have this script runing when you run your script.

Bhavesh

On Apr 30, 10:13 am, Chuck van der Linden  wrote:
> consider moving to watir-webdriver perhaps?
>
>
>
>
>
>
>
> On Sunday, April 29, 2012 10:19:33 PM UTC-7, AQUA wrote:
>
> > No I have been using, WATIR. And the issue I m facing is; basically I have
> > been able to handle the popup using some of the examples available on WATIR
> > wiki. But only with click_no_wait. Whenever I use fire_event the the
> > javascript is executed but the execution flow stuck until I manually click
> > the ok button. Hence the flow never enters the section of the code that is
> > used for handling pop-up without manual interference.
>
> > Thanks & Regards,
> > Manav
>
> > On Friday, April 27, 2012 1:37:34 PM UTC+5:30, Željko Filipin wrote:
>
> >> On Fri, Apr 27, 2012 at 8:42 AM, AQUA  wrote:
> >> > I have been working on WATIR for sometimes, but finding issues in
> >> handling Java Script pop-ups.
>
> >> If you are using watir-webdriver, this could help:
>
> >>http://watirwebdriver.com/javascript-dialogs/
>
> >> Željko
> >> --
> >> watir.com/book - author

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com