[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Of course you are right. The patch was attached to this email: http://rubyforge.org/pipermail/wtr-development/2009-January/000400.html It seems like this has not been put into Jira yet. Bret lokesh.agra...@gmail.com wrote: I applied the patch but still the same issue. This patch is for winClicker.rb I don't know how it's going to affect click_no_wait method. Can anyone please help me out. Thanks and Regards, Lokesh Agrawal On Feb 2, 9:08 pm, Bret Pettichord b...@pettichord.com wrote: http://jira.openqa.org/browse/WTR-279 lokesh.agra...@gmail.com wrote: Hi Bret, Can you please tell me from where I can get the patch? Thanks and Regards, Lokesh Agrawal On Jan 20, 7:53 am, Bret Pettichord b...@pettichord.com wrote: A patch that fixes this problem was recently submitted to the wtr-development list. Bret jensen2525 wrote: I ran into this issue and have been able to resolve what was causing this on Windows XP. This maynotbe what's causing it for other folks but hopefully it will point them in the right direction. We have an TeamCity server that will execute our tests using Rake on the build agents running Windows XP. When my scripts that were dealing with popups ran on the agents they failed every time with the same issue described in this thread. So what I did was take the simple Google sample and run it in a Command Prompt on the agent directly and it worked fine. I used the Command Prompt window and executed my full test case and it ran fine. I shut down the TeamCity build agent service, and ran their agent batch files directly (notthe service). I kicked the build off again and it ran fine this time. The problem seemed to be related to the Ruby process executing under the SYSTEM user account. I stopped running them through the service and instead as normal batch files in the Startup and they're working fine now. It seems like there is an issue related to the @page_container.eval_in_spawned_process when running under this type of security setup. Make sure whatever process is launching Ruby is running as a normal user account and see if that resolves the problem. Hope this helps. On Dec 12 2008, 9:19 am, Bret Pettichord b...@pettichord.com wrote: Your code is correct. There is something about your configuration that causes this to fail. Bret HAHAHA wrote: I have tried, using this code: require 'watir' browser = Watir::IE.new browser.goto('http://www.google.com') browser2 = Watir::IE.attach(:title, /Google/) browser2.text_field(:name, 'q').set('Watir') browser2.button(:name, 'btnG').click_no_wait The click_no_wait still cannot run. Is the code right? On Dec 12, 9:58 am, larryni...@gmail.com larryni...@gmail.com wrote: Pramod, could you show us an example of your code? On Dec 11, 11:01 pm, pramod D petkar.pra...@gmail.com wrote: Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.comwrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re:button.Click_No_Waitonlyhighlightsthebutton, doesnotclick Sorry, Michael, your code doesn't work either. It opens the page, highlightsthebuttonyellow, and then just sits there. No popup is ever launched because it doesn't actuallyclickthebutton. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait toclick!, itdoeslaunch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup opennotdoing anything. So, again, to summarize: click_no_wait is incapable of firing any events, butclick! makes the script hang.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
http://jira.openqa.org/browse/WTR-279 lokesh.agra...@gmail.com wrote: Hi Bret, Can you please tell me from where I can get the patch? Thanks and Regards, Lokesh Agrawal On Jan 20, 7:53 am, Bret Pettichord b...@pettichord.com wrote: A patch that fixes this problem was recently submitted to the wtr-development list. Bret jensen2525 wrote: I ran into this issue and have been able to resolve what was causing this on Windows XP. This maynotbe what's causing it for other folks but hopefully it will point them in the right direction. We have an TeamCity server that will execute our tests using Rake on the build agents running Windows XP. When my scripts that were dealing with popups ran on the agents they failed every time with the same issue described in this thread. So what I did was take the simple Google sample and run it in a Command Prompt on the agent directly and it worked fine. I used the Command Prompt window and executed my full test case and it ran fine. I shut down the TeamCity build agent service, and ran their agent batch files directly (notthe service). I kicked the build off again and it ran fine this time. The problem seemed to be related to the Ruby process executing under the SYSTEM user account. I stopped running them through the service and instead as normal batch files in the Startup and they're working fine now. It seems like there is an issue related to the @page_container.eval_in_spawned_process when running under this type of security setup. Make sure whatever process is launching Ruby is running as a normal user account and see if that resolves the problem. Hope this helps. On Dec 12 2008, 9:19 am, Bret Pettichord b...@pettichord.com wrote: Your code is correct. There is something about your configuration that causes this to fail. Bret HAHAHA wrote: I have tried, using this code: require 'watir' browser = Watir::IE.new browser.goto('http://www.google.com') browser2 = Watir::IE.attach(:title, /Google/) browser2.text_field(:name, 'q').set('Watir') browser2.button(:name, 'btnG').click_no_wait The click_no_wait still cannot run. Is the code right? On Dec 12, 9:58 am, larryni...@gmail.com larryni...@gmail.com wrote: Pramod, could you show us an example of your code? On Dec 11, 11:01 pm, pramod D petkar.pra...@gmail.com wrote: Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.comwrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re:button.Click_No_Waitonlyhighlightsthebutton, doesnotclick Sorry, Michael, your code doesn't work either. It opens the page, highlightsthebuttonyellow, and then just sits there. No popup is ever launched because it doesn't actuallyclickthebutton. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait toclick!, itdoeslaunch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup opennotdoing anything. So, again, to summarize: click_no_wait is incapable of firing any events, butclick! makes the script hang.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Hi, I am facing the same problem. click_no_wait is just highlighting the button, it's not clicking button. I using XP and Watir 1.5.6 Any pointers for the same will be appreciated. Thanks and Regards, Lokesh Agrawal On Dec 12 2008, 7:58 pm, larryni...@gmail.com larryni...@gmail.com wrote: Pramod, could you show us an example of your code? On Dec 11, 11:01 pm, pramod D petkar.pra...@gmail.com wrote: Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.comwrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Sorry, Michael, your code doesn't work either. It opens the page, highlights the button yellow, and then just sits there. No popup is ever launched because it doesn't actually click the button. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait to click!, it does launch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup open not doing anything. So, again, to summarize: click_no_wait is incapable of firing any events, but click! makes the script hang. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
A patch that fixes this problem was recently submitted to the wtr-development list. Bret jensen2525 wrote: I ran into this issue and have been able to resolve what was causing this on Windows XP. This may not be what's causing it for other folks but hopefully it will point them in the right direction. We have an TeamCity server that will execute our tests using Rake on the build agents running Windows XP. When my scripts that were dealing with popups ran on the agents they failed every time with the same issue described in this thread. So what I did was take the simple Google sample and run it in a Command Prompt on the agent directly and it worked fine. I used the Command Prompt window and executed my full test case and it ran fine. I shut down the TeamCity build agent service, and ran their agent batch files directly (not the service). I kicked the build off again and it ran fine this time. The problem seemed to be related to the Ruby process executing under the SYSTEM user account. I stopped running them through the service and instead as normal batch files in the Startup and they're working fine now. It seems like there is an issue related to the @page_container.eval_in_spawned_process when running under this type of security setup. Make sure whatever process is launching Ruby is running as a normal user account and see if that resolves the problem. Hope this helps. On Dec 12 2008, 9:19 am, Bret Pettichord b...@pettichord.com wrote: Your code is correct. There is something about your configuration that causes this to fail. Bret HAHAHA wrote: I have tried, using this code: require 'watir' browser = Watir::IE.new browser.goto('http://www.google.com') browser2 = Watir::IE.attach(:title, /Google/) browser2.text_field(:name, 'q').set('Watir') browser2.button(:name, 'btnG').click_no_wait The click_no_wait still cannot run. Is the code right? On Dec 12, 9:58 am, larryni...@gmail.com larryni...@gmail.com wrote: Pramod, could you show us an example of your code? On Dec 11, 11:01 pm, pramod D petkar.pra...@gmail.com wrote: Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.comwrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Sorry, Michael, your code doesn't work either. It opens the page, highlights the button yellow, and then just sits there. No popup is ever launched because it doesn't actually click the button. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait to click!, it does launch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup open not doing anything. So, again, to summarize: click_no_wait is incapable of firing any events, but click! makes the script hang.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
I ran into this issue and have been able to resolve what was causing this on Windows XP. This may not be what's causing it for other folks but hopefully it will point them in the right direction. We have an TeamCity server that will execute our tests using Rake on the build agents running Windows XP. When my scripts that were dealing with popups ran on the agents they failed every time with the same issue described in this thread. So what I did was take the simple Google sample and run it in a Command Prompt on the agent directly and it worked fine. I used the Command Prompt window and executed my full test case and it ran fine. I shut down the TeamCity build agent service, and ran their agent batch files directly (not the service). I kicked the build off again and it ran fine this time. The problem seemed to be related to the Ruby process executing under the SYSTEM user account. I stopped running them through the service and instead as normal batch files in the Startup and they're working fine now. It seems like there is an issue related to the @page_container.eval_in_spawned_process when running under this type of security setup. Make sure whatever process is launching Ruby is running as a normal user account and see if that resolves the problem. Hope this helps. On Dec 12 2008, 9:19 am, Bret Pettichord b...@pettichord.com wrote: Your code is correct. There is something about your configuration that causes this to fail. Bret HAHAHA wrote: I have tried, using this code: require 'watir' browser = Watir::IE.new browser.goto('http://www.google.com') browser2 = Watir::IE.attach(:title, /Google/) browser2.text_field(:name, 'q').set('Watir') browser2.button(:name, 'btnG').click_no_wait The click_no_wait still cannot run. Is the code right? On Dec 12, 9:58 am, larryni...@gmail.com larryni...@gmail.com wrote: Pramod, could you show us an example of your code? On Dec 11, 11:01 pm, pramod D petkar.pra...@gmail.com wrote: Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.comwrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Sorry, Michael, your code doesn't work either. It opens the page, highlights the button yellow, and then just sits there. No popup is ever launched because it doesn't actually click the button. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait to click!, it does launch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup open not doing anything. So, again, to summarize: click_no_wait is incapable of firing any events, but click! makes the script hang.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
I installed JDK6, NetBeans 6.5, Ruby one-click installer(1.8.6-27). When I clicked button, popup does not pop. I uninstalled ruby1.8.6-27 and re-installed ruby1.8.6-26.exe as administrator. Popup works fine for me now. 1. Uninstall ruby1.8.6-27 and re-install ruby1.8.6-26.exe 2. Open DOS command prompt, C:gem update --system 3. C:gem install watir 4. C:\Documents and Setting\administrator\gem install watir 5. Open Internet Explore7 Tools Internet OptionAdvanced TabCheck Allow active content... Good Luck. On Dec 18 2008, 4:34 pm, Michael Hwee michael_h...@yahoo.com wrote: Ok, please let us know the outcome. - Original Message From: HAHAHA windchillfigh...@gmail.com To:WatirGeneral watir-general@googlegroups.com Sent: Thursday, December 18, 2008 12:50:34 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button,doesnotclick I have tried to set IE to default, but itnotwork. Now I am trying to reinstall ruby andwatir. On Dec 18, 11:34 am, Michael Hwee michael_h...@yahoo.com wrote: First, go to your internet options and reset all your settings to default. On vista with IE7, check off the Protected Mode. Michael - Original Message From: HAHAHA windchillfigh...@gmail.com To:WatirGeneral watir-general@googlegroups.com Sent: Wednesday, December 17, 2008 12:49:43 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button,doesnotclick I tried, even change the security of IE to Low, but the click_no_wait still cannot click the button. Now I just want to know what's the problem. Is it my IE's problem or Ruby's problem? On Dec 17, 11:53 am, Michael Hwee michael_h...@yahoo.com wrote: Come and think of that, have you ever got successful dismissing any otherpopup? If I were you, I would be checking the browser configuration settings. Michael - Original Message From: Fish hhfish...@hotmail.com To:WatirGeneral watir-general@googlegroups.com Sent: Tuesday, December 16, 2008 5:21:33 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button,doesnotclick I use the ruby186-26,but still cannothandle thepopup...Just only block at the commandline. Doessomeone kindly do me a favor to provide code which can handle the modaldialog?I very appreciate it. I have tried below, but it doestn't work. @ie.button(:value, New).click_no_wait #popup a modaldialog, by the methodshowmodaldialog sleep(3) hwnd = @ie.enabled_popup(10) @ie1 = @ie.modal_dialog(:title, 'RFQ') The error like this: c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb: 59:in `wait _until': Timed out after 10.032 seconds. (Watir::Exception::TimeOutException) On Dec 16, 7:53 am, HAHAHA windchillfigh...@gmail.com wrote: I tried. The click_no_wait still cannot click the button. I think maybe it is really the configure problem. I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier version will be better? I know some programs cannot run in current version, like rubyscript2exe.rb. On Dec 16, 3:49 am, pramod D petkar.pra...@gmail.com wrote: Hi, I worked with your code and it is working fine, Only thing you need to do is introduce sleep(5) just before clicking the button. It will handle thepop up. Thanks, Pramod On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA windchillfigh...@gmail.com wrote: Thank you for your code. I test it. But Click_no_wait still cannot work. The result shows There's nopopup. Here is the code I used to test. I changed your code to get it. require 'watir' require 'watir/ie'# require 'watir\contrib\enabled_popup' #fafdfs require 'watir/dialog'#fafsfasd require 'watir/winClicker'#fasfsdfa require 'thread' def test_001_Login $batchCode=0 # attach a new browser window $ie =Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout =10 $ie.goto('http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alerthttp://www.w3schools.com/js/tryit_view.asp?filename=tryjs_alert') # This website only has an alert button, you can test using this website. $ie.button(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup= WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is nopopup end end test_001_Login Can you try it and see
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
I have tried to set IE to default, but it not work. Now I am trying to reinstall ruby and watir. On Dec 18, 11:34 am, Michael Hwee michael_h...@yahoo.com wrote: First, go to your internet options and reset all your settings to default. On vista with IE7, check off the Protected Mode. Michael - Original Message From: HAHAHA windchillfigh...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Wednesday, December 17, 2008 12:49:43 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I tried, even change the security of IE to Low, but the click_no_wait still cannot click the button. Now I just want to know what's the problem. Is it my IE's problem or Ruby's problem? On Dec 17, 11:53 am, Michael Hwee michael_h...@yahoo.com wrote: Come and think of that, have you ever got successful dismissing any other popup? If I were you, I would be checking the browser configuration settings. Michael - Original Message From: Fish hhfish...@hotmail.com To: Watir General watir-general@googlegroups.com Sent: Tuesday, December 16, 2008 5:21:33 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I use the ruby186-26,but still can not handle the popup...Just only block at the commandline. Does someone kindly do me a favor to provide code which can handle the modaldialog?I very appreciate it. I have tried below, but it doestn't work. @ie.button(:value, New).click_no_wait #pop up a modaldialog, by the methodshowmodaldialog sleep(3) hwnd = @ie.enabled_popup(10) @ie1 = @ie.modal_dialog(:title, 'RFQ') The error like this: c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb: 59:in `wait _until': Timed out after 10.032 seconds. (Watir::Exception::TimeOutException) On Dec 16, 7:53 am, HAHAHA windchillfigh...@gmail.com wrote: I tried. The click_no_wait still cannot click the button. I think maybe it is really the configure problem. I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier version will be better? I know some programs cannot run in current version, like rubyscript2exe.rb. On Dec 16, 3:49 am, pramod D petkar.pra...@gmail.com wrote: Hi, I worked with your code and it is working fine, Only thing you need to do is introduce sleep(5) just before clicking the button. It will handle the pop up. Thanks, Pramod On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA windchillfigh...@gmail.com wrote: Thank you for your code. I test it. But Click_no_wait still cannot work. The result shows There's no popup. Here is the code I used to test. I changed your code to get it. require 'watir' require 'watir/ie'# require 'watir\contrib\enabled_popup' #fafdfs require 'watir/dialog'#fafsfasd require 'watir/winClicker'#fasfsdfa require 'thread' def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout =10 $ie.goto('http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alerthttp://www.w3schools.com/js/tryit_view.asp?filename=tryjs_alert') # This website only has an alert button, you can test using this website. $ie.button(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is no popup end end test_001_Login Can you try it and see whether it can work in your computer? Thanks a lot. On Dec 12,10:15 pm, pramod D petkar.pra...@gmail.com wrote: I am posting a sample code which i am using in my script *def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout = 10.0 ... ... $ie.frame(mains).image(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Ok, please let us know the outcome. - Original Message From: HAHAHA windchillfigh...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 18, 2008 12:50:34 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I have tried to set IE to default, but it not work. Now I am trying to reinstall ruby and watir. On Dec 18, 11:34 am, Michael Hwee michael_h...@yahoo.com wrote: First, go to your internet options and reset all your settings to default. On vista with IE7, check off the Protected Mode. Michael - Original Message From: HAHAHA windchillfigh...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Wednesday, December 17, 2008 12:49:43 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I tried, even change the security of IE to Low, but the click_no_wait still cannot click the button. Now I just want to know what's the problem. Is it my IE's problem or Ruby's problem? On Dec 17, 11:53 am, Michael Hwee michael_h...@yahoo.com wrote: Come and think of that, have you ever got successful dismissing any other popup? If I were you, I would be checking the browser configuration settings. Michael - Original Message From: Fish hhfish...@hotmail.com To: Watir General watir-general@googlegroups.com Sent: Tuesday, December 16, 2008 5:21:33 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I use the ruby186-26,but still can not handle the popup...Just only block at the commandline. Does someone kindly do me a favor to provide code which can handle the modaldialog?I very appreciate it. I have tried below, but it doestn't work. @ie.button(:value, New).click_no_wait #pop up a modaldialog, by the methodshowmodaldialog sleep(3) hwnd = @ie.enabled_popup(10) @ie1 = @ie.modal_dialog(:title, 'RFQ') The error like this: c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb: 59:in `wait _until': Timed out after 10.032 seconds. (Watir::Exception::TimeOutException) On Dec 16, 7:53 am, HAHAHA windchillfigh...@gmail.com wrote: I tried. The click_no_wait still cannot click the button. I think maybe it is really the configure problem. I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier version will be better? I know some programs cannot run in current version, like rubyscript2exe.rb. On Dec 16, 3:49 am, pramod D petkar.pra...@gmail.com wrote: Hi, I worked with your code and it is working fine, Only thing you need to do is introduce sleep(5) just before clicking the button. It will handle the pop up. Thanks, Pramod On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA windchillfigh...@gmail.com wrote: Thank you for your code. I test it. But Click_no_wait still cannot work. The result shows There's no popup. Here is the code I used to test. I changed your code to get it. require 'watir' require 'watir/ie'# require 'watir\contrib\enabled_popup' #fafdfs require 'watir/dialog'#fafsfasd require 'watir/winClicker'#fasfsdfa require 'thread' def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout =10 $ie.goto('http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alerthttp://www.w3schools.com/js/tryit_view.asp?filename=tryjs_alert') # This website only has an alert button, you can test using this website. $ie.button(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is no popup end end test_001_Login Can you try it and see whether it can work in your computer? Thanks a lot. On Dec 12,10:15 pm, pramod D petkar.pra...@gmail.com wrote: I am posting a sample code which i am using in my script *def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout = 10.0 ... ... $ie.frame(mains).image(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
I tried, even change the security of IE to Low, but the click_no_wait still cannot click the button. Now I just want to know what's the problem. Is it my IE's problem or Ruby's problem? On Dec 17, 11:53 am, Michael Hwee michael_h...@yahoo.com wrote: Come and think of that, have you ever got successful dismissing any other popup? If I were you, I would be checking the browser configuration settings. Michael - Original Message From: Fish hhfish...@hotmail.com To: Watir General watir-general@googlegroups.com Sent: Tuesday, December 16, 2008 5:21:33 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I use the ruby186-26,but still can not handle the popup...Just only block at the commandline. Does someone kindly do me a favor to provide code which can handle the modaldialog?I very appreciate it. I have tried below, but it doestn't work. @ie.button(:value, New).click_no_wait #pop up a modaldialog, by the methodshowmodaldialog sleep(3) hwnd = @ie.enabled_popup(10) @ie1 = @ie.modal_dialog(:title, 'RFQ') The error like this: c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb: 59:in `wait _until': Timed out after 10.032 seconds. (Watir::Exception::TimeOutException) On Dec 16, 7:53 am, HAHAHA windchillfigh...@gmail.com wrote: I tried. The click_no_wait still cannot click the button. I think maybe it is really the configure problem. I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier version will be better? I know some programs cannot run in current version, like rubyscript2exe.rb. On Dec 16, 3:49 am, pramod D petkar.pra...@gmail.com wrote: Hi, I worked with your code and it is working fine, Only thing you need to do is introduce sleep(5) just before clicking the button. It will handle the pop up. Thanks, Pramod On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA windchillfigh...@gmail.com wrote: Thank you for your code. I test it. But Click_no_wait still cannot work. The result shows There's no popup. Here is the code I used to test. I changed your code to get it. require 'watir' require 'watir/ie'# require 'watir\contrib\enabled_popup' #fafdfs require 'watir/dialog'#fafsfasd require 'watir/winClicker'#fasfsdfa require 'thread' def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout =10 $ie.goto('http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alerthttp://www.w3schools.com/js/tryit_view.asp?filename=tryjs_alert') # This website only has an alert button, you can test using this website. $ie.button(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is no popup end end test_001_Login Can you try it and see whether it can work in your computer? Thanks a lot. On Dec 12,10:15 pm, pramod D petkar.pra...@gmail.com wrote: I am posting a sample code which i am using in my script *def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout = 10.0 ... ... $ie.frame(mains).image(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is no popup end def test_005_logout $ie.frame(header).image(:index,5).click $ie.goto(about:blank) $ie.minimize() end Initially i will open an blank browser manually(This is only for first time) and then in Login method i am attaching it and continue my script, in logout method again i am going to direct browser for balnk page. So nxt time when you re-run the script, blank page is available and script runs smoothly. If i directly open browser from the script it will not work. I am not sure what
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
I used to have the same problem, then I uninstalled my Ruby and Watir, then installed them again and the problem got fixed. You may want to try that too, use admin account to install Ruby (v.1.8.6-26), then install Watir, good luck! -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of HAHAHA Sent: Wednesday, December 17, 2008 12:50 PM To: Watir General Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I tried, even change the security of IE to Low, but the click_no_wait still cannot click the button. Now I just want to know what's the problem. Is it my IE's problem or Ruby's problem? On Dec 17, 11:53 am, Michael Hwee michael_h...@yahoo.com wrote: Come and think of that, have you ever got successful dismissing any other popup? If I were you, I would be checking the browser configuration settings. Michael - Original Message From: Fish hhfish...@hotmail.com To: Watir General watir-general@googlegroups.com Sent: Tuesday, December 16, 2008 5:21:33 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I use the ruby186-26,but still can not handle the popup...Just only block at the commandline. Does someone kindly do me a favor to provide code which can handle the modaldialog?I very appreciate it. I have tried below, but it doestn't work. @ie.button(:value, New).click_no_wait #pop up a modaldialog, by the methodshowmodaldialog sleep(3) hwnd = @ie.enabled_popup(10) @ie1 = @ie.modal_dialog(:title, 'RFQ') The error like this: c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb: 59:in `wait _until': Timed out after 10.032 seconds. (Watir::Exception::TimeOutException) On Dec 16, 7:53 am, HAHAHA windchillfigh...@gmail.com wrote: I tried. The click_no_wait still cannot click the button. I think maybe it is really the configure problem. I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier version will be better? I know some programs cannot run in current version, like rubyscript2exe.rb. On Dec 16, 3:49 am, pramod D petkar.pra...@gmail.com wrote: Hi, I worked with your code and it is working fine, Only thing you need to do is introduce sleep(5) just before clicking the button. It will handle the pop up. Thanks, Pramod On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA windchillfigh...@gmail.com wrote: Thank you for your code. I test it. But Click_no_wait still cannot work. The result shows There's no popup. Here is the code I used to test. I changed your code to get it. require 'watir' require 'watir/ie'# require 'watir\contrib\enabled_popup' #fafdfs require 'watir/dialog'#fafsfasd require 'watir/winClicker'#fasfsdfa require 'thread' def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout =10 $ie.goto('http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alerthttp://www.w3schools.com/js/tryit_view.asp?filename=tryjs_alert') # This website only has an alert button, you can test using this website. $ie.button(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is no popup end end test_001_Login Can you try it and see whether it can work in your computer? Thanks a lot. On Dec 12,10:15 pm, pramod D petkar.pra...@gmail.com wrote: I am posting a sample code which i am using in my script *def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout = 10.0 ... ... $ie.frame(mains).image(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is no popup end def test_005_logout $ie.frame(header).image(:index,5).click
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
:01 pm, pramod D petkar.pra...@gmail.com wrote: Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.com wrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Sorry, Michael, your code doesn't work either. It opens the page, highlights the button yellow, and then just sits there. No popup is ever launched because it doesn't actually click the button. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait to click!, it does launch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup open not doing anything. So, again, to summarize: click_no_wait is incapable of firing any events, but click! makes the script hang.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Thank you for your code. I test it. But Click_no_wait still cannot work. The result shows There's no popup. Here is the code I used to test. I changed your code to get it. require 'watir' require 'watir/ie'# require 'watir\contrib\enabled_popup' #fafdfs require 'watir/dialog'#fafsfasd require 'watir/winClicker'#fasfsdfa require 'thread' def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout = 10 $ie.goto('http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alert') # This website only has an alert button, you can test using this website. $ie.button(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is no popup end end test_001_Login Can you try it and see whether it can work in your computer? Thanks a lot. On Dec 12, 10:15 pm, pramod D petkar.pra...@gmail.com wrote: I am posting a sample code which i am using in my script *def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout = 10.0 ... ... $ie.frame(mains).image(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is no popup end def test_005_logout $ie.frame(header).image(:index,5).click $ie.goto(about:blank) $ie.minimize() end Initially i will open an blank browser manually(This is only for first time) and then in Login method i am attaching it and continue my script, in logout method again i am going to direct browser for balnk page. So nxt time when you re-run the script, blank page is available and script runs smoothly. If i directly open browser from the script it will not work. I am not sure what is the exact problem for time being i am using this approach. * On Fri, Dec 12, 2008 at 8:49 PM, Bret Pettichord b...@pettichord.comwrote: Your code is correct. There is something about your configuration that causes this to fail. Bret HAHAHA wrote: I have tried, using this code: require 'watir' browser = Watir::IE.new browser.goto('http://www.google.com') browser2 = Watir::IE.attach(:title, /Google/) browser2.text_field(:name, 'q').set('Watir') browser2.button(:name, 'btnG').click_no_wait The click_no_wait still cannot run. Is the code right? On Dec 12, 9:58 am, larryni...@gmail.com larryni...@gmail.com wrote: Pramod, could you show us an example of your code? On Dec 11, 11:01 pm, pramod D petkar.pra...@gmail.com wrote: Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.com wrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Sorry, Michael, your code doesn't work either. It opens the page, highlights the button yellow, and then just sits there. No popup is ever launched because it doesn't actually click the button. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait to click!, it does launch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup open not doing anything. So, again, to summarize: click_no_wait is incapable of firing any events, but click! makes the script hang.- Hide quoted text
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
I have tried, using this code: require 'watir' browser = Watir::IE.new browser.goto('http://www.google.com') browser2 = Watir::IE.attach(:title, /Google/) browser2.text_field(:name, 'q').set('Watir') browser2.button(:name, 'btnG').click_no_wait The click_no_wait still cannot run. Is the code right? On Dec 12, 9:58 am, larryni...@gmail.com larryni...@gmail.com wrote: Pramod, could you show us an example of your code? On Dec 11, 11:01 pm, pramod D petkar.pra...@gmail.com wrote: Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.comwrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Sorry, Michael, your code doesn't work either. It opens the page, highlights the button yellow, and then just sits there. No popup is ever launched because it doesn't actually click the button. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait to click!, it does launch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup open not doing anything. So, again, to summarize: click_no_wait is incapable of firing any events, but click! makes the script hang.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Relax -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of HAHAHA Sent: Friday, December 12, 2008 9:14 AM To: Watir General Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Why I cannot reply? Just try. On Nov 28, 4:51 am, patrick patrick.thoma...@gmail.com wrote: hi, i am using the foll versions: win xp sp2 ruby - 1.8.6 watir - 1.6.2 ie - 7.0 my code is as follows: irb require watir browser = Watir::IE.start('http://www.google.com') browser.text_field(:name, 'q').set('Watir') browser.button(:name, 'btnG').click_no_wait however, the Google Search button is only highlighted. the button is not clicked and the subsequent page is not loaded. I know i can use click in this case, however the Click_no_wait is not working in any code on my pc. pls help. patrick. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
I am posting a sample code which i am using in my script *def test_001_Login $batchCode=0 # attach a new browser window $ie = Watir::IE.attach(:url,about:blank) Watir::IE.attach_timeout = 10.0 ... ... $ie.frame(mains).image(:index,1).click_no_wait begin hwnd = $ie.enabled_popup(5) if(hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,OK) #Click the OK button end rescue = e puts e puts There is no popup end def test_005_logout $ie.frame(header).image(:index,5).click $ie.goto(about:blank) $ie.minimize() end Initially i will open an blank browser manually(This is only for first time) and then in Login method i am attaching it and continue my script, in logout method again i am going to direct browser for balnk page. So nxt time when you re-run the script, blank page is available and script runs smoothly. If i directly open browser from the script it will not work. I am not sure what is the exact problem for time being i am using this approach. * On Fri, Dec 12, 2008 at 8:49 PM, Bret Pettichord b...@pettichord.comwrote: Your code is correct. There is something about your configuration that causes this to fail. Bret HAHAHA wrote: I have tried, using this code: require 'watir' browser = Watir::IE.new browser.goto('http://www.google.com') browser2 = Watir::IE.attach(:title, /Google/) browser2.text_field(:name, 'q').set('Watir') browser2.button(:name, 'btnG').click_no_wait The click_no_wait still cannot run. Is the code right? On Dec 12, 9:58 am, larryni...@gmail.com larryni...@gmail.com wrote: Pramod, could you show us an example of your code? On Dec 11, 11:01 pm, pramod D petkar.pra...@gmail.com wrote: Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.com wrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Sorry, Michael, your code doesn't work either. It opens the page, highlights the button yellow, and then just sits there. No popup is ever launched because it doesn't actually click the button. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait to click!, it does launch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup open not doing anything. So, again, to summarize: click_no_wait is incapable of firing any events, but click! makes the script hang.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Okay, so: autoit. Here's some code that I got off another site that doesn't work to dismiss popups: require 'watir' require 'watir/dialog' def check_for_popups autoit = WIN32OLE.new('AutoItX3.Control') # # Do forever - assumes popups could occur anywhere/anytime in your application. loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Windows Internet Explorer', '', 1) # # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if (ret==1) then autoit.Send('{enter}') end # # Take a rest to avoid chewing up cycles and give another thread a go. # Then resume the loop. sleep(3) end end # # MAIN APPLICATION CODE # Setup popup handler $popup = Thread.new { check_for_popups } # start popup handler at_exit { Thread.kill($popup) } # kill thread on exit of main application link = 'http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alert' ie = Watir::IE.start(link) # ensure popup won't block Watir ie.button(:value, 'Display alert box').click! dialog = Watir::Dialog.new # Need to be able to poll window to exist sleep 7.0 # Remember that the only button to click is OK! dialog.button('OK').click # Wait for dialog to do its stuff # and wait for IE to return to live ie.waitForIE I got the popup-handling code from http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups, and the rest of it is from http://en.wikipedia.org/wiki/Watir#Handling_pop-ups. Is the above code put together correctly? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Ok, I have gone through your codes and actually wrote the script similar to yours. I don't understand when you said 'click_no_wait' is not working. To me, it is working just fine. Here is my codes and dismiss the js popup. require 'watir/ie' require 'watir/contrib/enabled_popup' def handle_nextpopup(sButton=nil) while true begin hwnd = $ie.enabled_popup(5) rescue hwnd = nil end if (hwnd) #yeah! a popup popup = WinClicker.new popup.makeWindowActive(hwnd) if sButton != nil begin popup.clickWindowsButton_hwnd(hwnd, sButton ); rescue; end else autoit = WIN32OLE.new(AutoItX3.Control) autoit.Send('{ESC}') sleep(2) end break end sleep(2) end end link = 'http://www.w3schools.com/js/tryit_view.asp?filename=tryjs_alert' $ie = Watir::IE.start(link) # ensure popup won't block Watir $ie.button(:value, 'Display alert box').click_no_wait #wait for popup handle_nextpopup(OK) Please be more specific on what you found as problem. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 6:47:52 AM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Okay, so: autoit. Here's some code that I got off another site that doesn't work to dismiss popups: require 'watir' require 'watir/dialog' def check_for_popups autoit = WIN32OLE.new('AutoItX3.Control') # # Do forever - assumes popups could occur anywhere/anytime in your application. loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Windows Internet Explorer', '', 1) # # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if (ret==1) then autoit.Send('{enter}') end # # Take a rest to avoid chewing up cycles and give another thread a go. # Then resume the loop. sleep(3) end end # # MAIN APPLICATION CODE # Setup popup handler $popup = Thread.new { check_for_popups } # start popup handler at_exit { Thread.kill($popup) } # kill thread on exit of main application link = 'http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alert' ie = Watir::IE.start(link) # ensure popup won't block Watir ie.button(:value, 'Display alert box').click! dialog = Watir::Dialog.new # Need to be able to poll window to exist sleep 7.0 # Remember that the only button to click is OK! dialog.button('OK').click # Wait for dialog to do its stuff # and wait for IE to return to live ie.waitForIE I got the popup-handling code from http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups, and the rest of it is from http://en.wikipedia.org/wiki/Watir#Handling_pop-ups. Is the above code put together correctly? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Sorry, Michael, your code doesn't work either. It opens the page, highlights the button yellow, and then just sits there. No popup is ever launched because it doesn't actually click the button. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait to click!, it does launch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup open not doing anything. So, again, to summarize: click_no_wait is incapable of firing any events, but click! makes the script hang. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Hi Michael, Initially i also faced same problem when i use Click_no_wait control was going but never clicked it, To come around this initially i opened the IE (IE7)with blank page and then, i will attach the browser at the start of the script and continue to execute my script as usual and worked correctly. For time being you can fallow this turn around method. Thanks, Pramod On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee michael_h...@yahoo.comwrote: That is disappointing. I believe that is something like OS and/or configuration issues, rather than watir itself. Michael - Original Message From: larryni...@gmail.com larryni...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Thursday, December 11, 2008 12:00:00 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Sorry, Michael, your code doesn't work either. It opens the page, highlights the button yellow, and then just sits there. No popup is ever launched because it doesn't actually click the button. Watir doesn't report any errors, but it never completes, either. If I change click_no_wait to click!, it does launch the popup, but the handle_nextpopup command never executes - it's been sitting here for 90-120 seconds with the popup open not doing anything. So, again, to summarize: click_no_wait is incapable of firing any events, but click! makes the script hang. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Correct, Bret. That puzzles me the reason to use a new process to do the click_no_wait. Since click() is working, I suggest to use 'click!' as click_no_wait alternate way for now. - Original Message From: Bret Pettichord [EMAIL PROTECTED] To: watir-general@googlegroups.com Sent: Tuesday, December 9, 2008 7:05:33 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Michael Hwee wrote: The only different between 'click' and 'click_no_wait' is 'wait' statement is removed. Actually no. This is not the only difference. The big difference is that with click_no_wait the click method is actually executed in a separate process that attaches to the window. If there are any errors here (which could happen, as this is complicated) you will not see them. Because they occur in a separate process. Bret --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
What is the statement after the click_no_wait? If you use handle_popup, add some more seconds to wait; especially on slow machine. What I know is, the click_no_wait actually happens. But, when the browser or server is being ready to respond, your next code statement executes. Try putting -- sleep(20) right after click_no_wait to see anything happens at all for a test. If something happens, you know the browser or server is slow to respond. If nothing happens again, the link/button you click on, may need fire_event. Michael - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Watir General watir-general@googlegroups.com Sent: Monday, December 8, 2008 12:55:29 PM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click XP SP2 Ruby 1.8 Watir 1.6.2 IE 7.0.5730.13 For what it's worth, I'm not an administrator on this machine, which has caused some problems with Ruby in the past but never anything (that I know of, anyway) like this. I also have the IE developer toolbar installed, which is about the extent of the weirdness that I can think of. Anything else I should find out? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Also it happened to me on IE6, I did not upgrade my browser, just upgraded to watir 1.6.2 then it's broken. -Original Message- From: watir-general@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, December 09, 2008 8:59 AM To: Watir General Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Michael - I thought of that already and put in a click_no_wait that just selected a link. Nothing happened, so it wasn't just the popup- handling code. What would a fire_event command look like, exactly? Right now, the line that has the problem for me is BROWSER.button(:id, Btndelete).click_no_wait Are you saying I should add after that: BROWSER.button(:id, Btndelete).fire_event If so, won't that defeat the purpose of having a no_wait command? In other words, won't my script then hang instead of executing the popup handler? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
Are you saying when you use 'click', the button was clicked properly? The only different between 'click' and 'click_no_wait' is 'wait' statement is removed. Can you check to be made sure that is an 'Input', rather than 'a' html tag? - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Watir General watir-general@googlegroups.com Sent: Tuesday, December 9, 2008 8:58:46 AM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click Michael - I thought of that already and put in a click_no_wait that just selected a link. Nothing happened, so it wasn't just the popup- handling code. What would a fire_event command look like, exactly? Right now, the line that has the problem for me is BROWSER.button(:id, Btndelete).click_no_wait Are you saying I should add after that: BROWSER.button(:id, Btndelete).fire_event If so, won't that defeat the purpose of having a no_wait command? In other words, won't my script then hang instead of executing the popup handler? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
XP SP2 Ruby 1.8 Watir 1.6.2 IE 7.0.5730.13 For what it's worth, I'm not an administrator on this machine, which has caused some problems with Ruby in the past but never anything (that I know of, anyway) like this. I also have the IE developer toolbar installed, which is about the extent of the weirdness that I can think of. Anything else I should find out? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
I have the same problem. I don't know why it highlight the button but not click it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
I have the same issue, I don't know if it's related to taking away the include 'watir' line cause I remember I had to add that line to make it work. Contacted the author of the enabled_popup David Schmidt, he said he hasn't used Watir for over two years so he can't help anymore. Neil -Original Message- From: watir-general@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of HAHAHA Sent: Monday, December 08, 2008 1:43 PM To: Watir General Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I have the same problem. I don't know why it highlight the button but not click it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
thanx for the response Bret. i will try and downgrade to ie6 and try the same patrick. On Dec 2, 12:23 am, Bret Pettichord [EMAIL PROTECTED] wrote: This works for me, although I am using ie 6.0. I'm wondering if this is broken with ie 7. Can any one else try this out? Bret patrickwrote: hi, i am using the foll versions: win xp sp2 ruby - 1.8.6 watir - 1.6.2 ie - 7.0 my code is as follows: irb require watir browser = Watir::IE.start('http://www.google.com') browser.text_field(:name, 'q').set('Watir') browser.button(:name, 'btnG').click_no_wait however, the Google Search button is only highlighted. the button is not clicked and the subsequent page is not loaded. I know i can use click in this case, however the Click_no_wait is not working in any code on my pc. pls help. patrick.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click
This works for me, although I am using ie 6.0. I'm wondering if this is broken with ie 7. Can any one else try this out? Bret patrick wrote: hi, i am using the foll versions: win xp sp2 ruby - 1.8.6 watir - 1.6.2 ie - 7.0 my code is as follows: irb require watir browser = Watir::IE.start('http://www.google.com') browser.text_field(:name, 'q').set('Watir') browser.button(:name, 'btnG').click_no_wait however, the Google Search button is only highlighted. the button is not clicked and the subsequent page is not loaded. I know i can use click in this case, however the Click_no_wait is not working in any code on my pc. pls help. patrick. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---