[wtr-general] Re: Logging to file with Firefox
Full script with line numbers (followed by the full error); 1 #-# 2 require 'watir' 3 require 'test/unit' 4 require 'example_logger1' 5 6 class TC_go_to_homepage Test::Unit::TestCase 7 8 def start 9 Watir::Browser.default = 'firefox' 10 $browser = Watir::Browser.new 11 # $browser.speed = :fast 12 $homepage = http://www.figleaves.com; 13 filePrefix = create_account_log 14 $logger = LoggerFactory.start_xml_logger(filePrefix) 15 $browser.set_logger($logger) 16 end 17 18 def test_a 19start 20$logger.log(Beginning of test: Figleaves - Go to Homepage) 21$logger.log( Step 1: go to Figleaves.com) 22$browser.goto $homepage 23 if $browser.url == http://www.figleaves.com/uk/home.asp; 24$logger.log( Result: Passed) 25 else 26$logger.log( Result: Failed) 27 end 28 end 29 30 end 31 #---# Output; ruby test_firefox_logging.rb Loaded suite test_firefox_logging Started log Starting XMLLogger... E Finished in 4.656 seconds. 1) Error: test_a(TC_go_to_homepage): NoMethodError: undefined method `set_logger' for #FireWatir::Firefox: 0x3383cb0 test_firefox_logging.rb:15:in `start' test_firefox_logging.rb:19:in `test_a' 1 tests, 0 assertions, 0 failures, 1 errors Exit code: 1 --~--~-~--~~~---~--~~ 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: How can we take screen shot when error occurs?
Hi Kiran, Thanks for the reply. Please find the code below. require 'test/unit' require 'watir' require 'watir/assertions' require 'watir/screen_capture' class Portal Test::Unit::TestCase include Watir::Assertions include Watir::ScreenCapture def test_Working #Open IE and navigate to site ie = Watir::IE.new ie.goto http://www.acs.org/; # Click the link 'Managing your finances' ie.link(:text, Journals).click # Capturing first image screen_capture(keywords.jpg,true) sleep 5 # Clicking on search button ie.button(:name, searchSub).click # Capturing second image which is not working at the moment screen_capture(keywordserror.jpg,true) # Close the browser ie.close() end end Please let me what I need to amend so that the above code will work. Thanks again. Durgesh. --- On Mon, 11/5/09, kiran gki...@gmail.com wrote: From: kiran gki...@gmail.com Subject: [wtr-general] Re: How can we take screen shot when error occurs? To: Watir General watir-general@googlegroups.com Date: Monday, 11 May, 2009, 5:13 PM Give me the code that your using. On May 11, 4:13 pm, Durgesh Nadkarni durgeshnadka...@gmail.com wrote: Hi, I want to take screen shots of the web pages twice by using following method. screen_capture(somename.jpg,true) For first image it works fine. Then I clicked on Submit button for which there is one javascript validation kept. So as soon as I click on Submit button that alert error window appears. And I want to take the screenshot of this page with error window. But its not opening the paint application to save the image unless I manually click on OK button close the error window. So please help me as to how can we take the screen shot of the web page having javascript error on it. Thanks Regards Durgesh. Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox --~--~-~--~~~---~--~~ 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: file download popup handle
Hi, Use Clik_no_wait instead of click and use threads.its something like this t=Thread.new{ file_download_code } t.join() Thnaks, kiran. On May 12, 9:36 am, curious csamigr...@gmail.com wrote: I put below code in order to automate file download popup.. ie.button(:name, Button5).click . when WATIR reaches above code.. File download popup shows up.. and the code below should handle this popup and save the file to be downloaded.. however, the code is just sitting there.. 'File download' popup shows up.. but it is not going anywhere.. the file download popup just stays on.. and below code is not handling saving the file.. what am I doing wrong?? Could anyone please tell me how I should adjust the code below in order to automate File download process?? thanks. prompt_message = Do you want to open or save this file? window_title = File Download save_dialog = WIN32OLE.new(AutoItX3.Control) sleep 1 save_dialog_obtained = save_dialog.WinWaitActive (window_title,prompt_message, 25) save_dialog.ControlFocus(window_title, prompt_message, Save) sleep 1 save_dialog.Send(S) save_dialog.ControlClick(window_title, prompt_message, Save) save_dialog.WinSetTitle(window_title, prompt_message, This is ForTesting ) saveas_dialog_obtained = save_dialog.WinWait(Save As, Savein, 5) sleep 1 path = File.dirname(__FILE__).gsub(/ , \\ )+ \\ + fileName save_dialog.ControlSend(Save As, , Edit1,path) sleep 4 save_dialog.ControlClick(Save As, Save in, Save) save_fileAlreadyExists = save_dialog.WinWait(Save As, , 5) def save_file(filepath) ai = WIN32OLE.new(AutoItX3.Control) ai.WinWait(File Download, , 5) ai.ControlFocus(File Download, , Save) sleep 1 ai.ControlClick(File Download, , Save, left) ai.WinWait(Save As, , 5) sleep 1 ai.ControlSend(Save As, , Edit1,filepath) ai.ControlClick(Save As, , Save, left) ai.WinWait(Download complete, , 5) ai.ControlClick(Download complete, , Close) end --~--~-~--~~~---~--~~ 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: How can we take screen shot when error occurs?
Change code to # Clicking on search button ie.button(:name, searchSub).click_no_wait # Capturing second image which is not working at the moment screen_capture(keywordserror.jpg,true) Thanks, kiran. On May 12, 12:02 pm, Durgesh Nadkarni fordurg...@yahoo.co.in wrote: Hi Kiran, Thanks for the reply. Please find the code below. require 'test/unit' require 'watir' require 'watir/assertions' require 'watir/screen_capture' class Portal Test::Unit::TestCase include Watir::Assertions include Watir::ScreenCapture def test_Working #Open IE and navigate to site ie = Watir::IE.new ie.goto http://www.acs.org/; # Click the link 'Managing your finances' ie.link(:text, Journals).click # Capturing first image screen_capture(keywords.jpg,true) sleep 5 # Clicking on search button ie.button(:name, searchSub).click # Capturing second image which is not working at the moment screen_capture(keywordserror.jpg,true) # Close the browser ie.close() end end Please let me what I need to amend so that the above code will work. Thanks again. Durgesh. --- On Mon, 11/5/09, kiran gki...@gmail.com wrote: From: kiran gki...@gmail.com Subject: [wtr-general] Re: How can we take screen shot when error occurs? To: Watir General watir-general@googlegroups.com Date: Monday, 11 May, 2009, 5:13 PM Give me the code that your using. On May 11, 4:13 pm, Durgesh Nadkarni durgeshnadka...@gmail.com wrote: Hi, I want to take screen shots of the web pages twice by using following method. screen_capture(somename.jpg,true) For first image it works fine. Then I clicked on Submit button for which there is one javascript validation kept. So as soon as I click on Submit button that alert error window appears. And I want to take the screenshot of this page with error window. But its not opening the paint application to save the image unless I manually click on OK button close the error window. So please help me as to how can we take the screen shot of the web page having javascript error on it. Thanks Regards Durgesh. Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Editionhttp://downloads.yahoo.com/in/firefox/?fr=om_email_firefox --~--~-~--~~~---~--~~ 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: Problems dealing with javascript popups
I have used the below code and it worked fine in my project. Thread.new{ sleep(3) # put appropriate sleep time Watir.autoit.WinWait(Title name) Watir.autoit.WinActivate(Title name) Watir.autoit.Send(username) Watir.autoit.Send('{TAB}') Watir.autoit.Send(password) Watir.autoit.Send('{ENTER}') } ie.goto(url) Thanks, kiran. On May 12, 12:34 pm, SushilKarwa sushil.ka...@gmail.com wrote: Its still not working for me. I tried creating a new thread.. But when the pop up occurs, it just hangs and doesn't proceed further until I manually click on the OK button... Any other way to get rid if this problem... Regards, S.K On May 12, 10:54 am, kiran gki...@gmail.com wrote: Hi, Use threads,it may help. some thing like this t=Thread.new{ pop-up code} t.join Thanks, kiran. On May 12, 10:13 am, SushilKarwa sushil.ka...@gmail.com wrote: Any help is much appreciated Regards, S.K On May 11, 6:12 pm, SushilKarwa sushil.ka...@gmail.com wrote: Hi Group, I am struggling to handle the JavaScript popups. Let me explain my scenario to you guys. In my web application am executing certain URL. Once that url is executed it pops up a javaScript alert box. From within the same browser window I need to click on the ok button to get out of that box. But it doesnt seem to be happening. My test is if I get a pop up then FAIL else PASS the test. I have been using the following code in my main program. test.goto(http://example.com/sample.do?param1=abc,param2=xyz;) check_for_popup(Windows Internet Explorer,OK).should == false) and my check_for_popup is something like this def chk_for_popups(title,button) puts(In popups method...) autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(title,,1) if (ret==1) puts There is pop up. autoit.WinActivate(title) button.downcase! if button.eql?(ok) || button.eql?(yes) || button.eql? (continue) autoit.Send({Enter}) else autoit.Send({tab}) autoit.Send({Enter}) end return true elsif (ret==0) puts No pop up. return false end end Now the problem is when I execute the URL, its not entering the check_for_popup(). Only when I manually click OK button on the alert box, it enters this method, which is kind of confusing. Not sure why is this happening... Could anybody help me solving this issue.. Thanks in advance, S.K --~--~-~--~~~---~--~~ 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: Problems dealing with javascript popups
Please tell me still if you have any issues. Thanks, kiran. On May 12, 1:46 pm, kiran gki...@gmail.com wrote: I have used the below code and it worked fine in my project. Thread.new{ sleep(3) # put appropriate sleep time Watir.autoit.WinWait(Title name) Watir.autoit.WinActivate(Title name) Watir.autoit.Send(username) Watir.autoit.Send('{TAB}') Watir.autoit.Send(password) Watir.autoit.Send('{ENTER}') } ie.goto(url) Thanks, kiran. On May 12, 12:34 pm, SushilKarwa sushil.ka...@gmail.com wrote: Its still not working for me. I tried creating a new thread.. But when the pop up occurs, it just hangs and doesn't proceed further until I manually click on the OK button... Any other way to get rid if this problem... Regards, S.K On May 12, 10:54 am, kiran gki...@gmail.com wrote: Hi, Use threads,it may help. some thing like this t=Thread.new{ pop-up code} t.join Thanks, kiran. On May 12, 10:13 am, SushilKarwa sushil.ka...@gmail.com wrote: Any help is much appreciated Regards, S.K On May 11, 6:12 pm, SushilKarwa sushil.ka...@gmail.com wrote: Hi Group, I am struggling to handle the JavaScript popups. Let me explain my scenario to you guys. In my web application am executing certain URL. Once that url is executed it pops up a javaScript alert box. From within the same browser window I need to click on the ok button to get out of that box. But it doesnt seem to be happening. My test is if I get a pop up then FAIL else PASS the test. I have been using the following code in my main program. test.goto(http://example.com/sample.do?param1=abc,param2=xyz;) check_for_popup(Windows Internet Explorer,OK).should == false) and my check_for_popup is something like this def chk_for_popups(title,button) puts(In popups method...) autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(title,,1) if (ret==1) puts There is pop up. autoit.WinActivate(title) button.downcase! if button.eql?(ok) || button.eql?(yes) || button.eql? (continue) autoit.Send({Enter}) else autoit.Send({tab}) autoit.Send({Enter}) end return true elsif (ret==0) puts No pop up. return false end end Now the problem is when I execute the URL, its not entering the check_for_popup(). Only when I manually click OK button on the alert box, it enters this method, which is kind of confusing. Not sure why is this happening... Could anybody help me solving this issue.. Thanks in advance, S.K --~--~-~--~~~---~--~~ 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: How can we take screen shot when error occurs?
Hi Kiran, I have tried using click_no_wait method. But its still not working. This time it stores the file with extension .mht and that too before alert window appears. Do I need to make any more changes? Thanks Durgesh. --- On Tue, 12/5/09, kiran gki...@gmail.com wrote: From: kiran gki...@gmail.com Subject: [wtr-general] Re: How can we take screen shot when error occurs? To: Watir General watir-general@googlegroups.com Date: Tuesday, 12 May, 2009, 2:00 PM Change code to # Clicking on search button ie.button(:name, searchSub).click_no_wait # Capturing second image which is not working at the moment screen_capture(keywordserror.jpg,true) Thanks, kiran. On May 12, 12:02 pm, Durgesh Nadkarni fordurg...@yahoo.co.in wrote: Hi Kiran, Thanks for the reply. Please find the code below. require 'test/unit' require 'watir' require 'watir/assertions' require 'watir/screen_capture' class Portal Test::Unit::TestCase include Watir::Assertions include Watir::ScreenCapture def test_Working #Open IE and navigate to site ie = Watir::IE.new ie.goto http://www.acs.org/; # Click the link 'Managing your finances' ie.link(:text, Journals).click # Capturing first image screen_capture(keywords.jpg,true) sleep 5 # Clicking on search button ie.button(:name, searchSub).click # Capturing second image which is not working at the moment screen_capture(keywordserror.jpg,true) # Close the browser ie.close() end end Please let me what I need to amend so that the above code will work. Thanks again. Durgesh. --- On Mon, 11/5/09, kiran gki...@gmail.com wrote: From: kiran gki...@gmail.com Subject: [wtr-general] Re: How can we take screen shot when error occurs? To: Watir General watir-general@googlegroups.com Date: Monday, 11 May, 2009, 5:13 PM Give me the code that your using. On May 11, 4:13 pm, Durgesh Nadkarni durgeshnadka...@gmail.com wrote: Hi, I want to take screen shots of the web pages twice by using following method. screen_capture(somename.jpg,true) For first image it works fine. Then I clicked on Submit button for which there is one javascript validation kept. So as soon as I click on Submit button that alert error window appears. And I want to take the screenshot of this page with error window. But its not opening the paint application to save the image unless I manually click on OK button close the error window. So please help me as to how can we take the screen shot of the web page having javascript error on it. Thanks Regards Durgesh. Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Editionhttp://downloads.yahoo.com/in/firefox/?fr=om_email_firefox Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox --~--~-~--~~~---~--~~ 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: How can we take screen shot when error occurs?
Hi Mark, Thanks for the reply. But .click_no_wait method is not working. It just creates one .mht file before the alert error window appears. Is there any other way to deal with this problem? Thanks Durgesh. --- On Mon, 11/5/09, Mark Anderson mander...@drillinginfo.com wrote: From: Mark Anderson mander...@drillinginfo.com Subject: [wtr-general] Re: How can we take screen shot when error occurs? To: watir-general@googlegroups.com Date: Monday, 11 May, 2009, 7:33 PM My first instinct is that you want to use .click_no_wait instead of .click on the submit button. .click waits for the next screen to load which doesn’t happen until after the error window has been dealt with. /\/\ark From: watir-general@googlegroups.com [mailto: watir-general@googlegroups.com ] On Behalf Of Durgesh Nadkarni Sent: Monday, May 11, 2009 6:13 AM To: watir-general@googlegroups.com Subject: [wtr-general] How can we take screen shot when error occurs? Hi, I want to take screen shots of the web pages twice by using following method. screen_capture(somename.jpg,true) For first image it works fine. Then I clicked on Submit button for which there is one javascript validation kept. So as soon as I click on Submit button that alert error window appears. And I want to take the screenshot of this page with error window. But its not opening the paint application to save the image unless I manually click on OK button close the error window. So please help me as to how can we take the screen shot of the web page having javascript error on it. Thanks Regards Durgesh. __ Information from ESET NOD32 Antivirus, version of virus signature database 4064 (20090511) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 4064 (20090511) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox --~--~-~--~~~---~--~~ 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: Problems dealing with javascript popups
Thanks for your help. I was able to successfully get the alert box and click on the OK button with the code you provided... Would this still work if there are multiple alert boxes..I mean after I click OK on the first box and then another one appears..Would this still handle that... Thanks, S.K On May 12, 1:51 pm, kiran gki...@gmail.com wrote: Please tell me still if you have any issues. Thanks, kiran. On May 12, 1:46 pm, kiran gki...@gmail.com wrote: I have used the below code and it worked fine in my project. Thread.new{ sleep(3) # put appropriate sleep time Watir.autoit.WinWait(Title name) Watir.autoit.WinActivate(Title name) Watir.autoit.Send(username) Watir.autoit.Send('{TAB}') Watir.autoit.Send(password) Watir.autoit.Send('{ENTER}') } ie.goto(url) Thanks, kiran. On May 12, 12:34 pm, SushilKarwa sushil.ka...@gmail.com wrote: Its still not working for me. I tried creating a new thread.. But when the pop up occurs, it just hangs and doesn't proceed further until I manually click on the OK button... Any other way to get rid if this problem... Regards, S.K On May 12, 10:54 am, kiran gki...@gmail.com wrote: Hi, Use threads,it may help. some thing like this t=Thread.new{ pop-up code} t.join Thanks, kiran. On May 12, 10:13 am, SushilKarwa sushil.ka...@gmail.com wrote: Any help is much appreciated Regards, S.K On May 11, 6:12 pm, SushilKarwa sushil.ka...@gmail.com wrote: Hi Group, I am struggling to handle the JavaScript popups. Let me explain my scenario to you guys. In my web application am executing certain URL. Once that url is executed it pops up a javaScript alert box. From within the same browser window I need to click on the ok button to get out of that box. But it doesnt seem to be happening. My test is if I get a pop up then FAIL else PASS the test. I have been using the following code in my main program. test.goto(http://example.com/sample.do?param1=abc,param2=xyz;) check_for_popup(Windows Internet Explorer,OK).should == false) and my check_for_popup is something like this def chk_for_popups(title,button) puts(In popups method...) autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(title,,1) if (ret==1) puts There is pop up. autoit.WinActivate(title) button.downcase! if button.eql?(ok) || button.eql?(yes) || button.eql? (continue) autoit.Send({Enter}) else autoit.Send({tab}) autoit.Send({Enter}) end return true elsif (ret==0) puts No pop up. return false end end Now the problem is when I execute the URL, its not entering the check_for_popup(). Only when I manually click OK button on the alert box, it enters this method, which is kind of confusing. Not sure why is this happening... Could anybody help me solving this issue.. Thanks in advance, S.K --~--~-~--~~~---~--~~ 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: Logging to file with Firefox
FireWatir doesn't support logging like Watir does. You need to write your own logger for that. You can add a JIRA ticket for this. - Angrez On Tue, May 12, 2009 at 12:14 PM, ash ashbr...@gmail.com wrote: Full script with line numbers (followed by the full error); 1 #-# 2 require 'watir' 3 require 'test/unit' 4 require 'example_logger1' 5 6 class TC_go_to_homepage Test::Unit::TestCase 7 8 def start 9 Watir::Browser.default = 'firefox' 10 $browser = Watir::Browser.new 11 # $browser.speed = :fast 12 $homepage = http://www.figleaves.com; 13 filePrefix = create_account_log 14 $logger = LoggerFactory.start_xml_logger(filePrefix) 15 $browser.set_logger($logger) 16 end 17 18 def test_a 19start 20$logger.log(Beginning of test: Figleaves - Go to Homepage) 21$logger.log( Step 1: go to Figleaves.com) 22$browser.goto $homepage 23 if $browser.url == http://www.figleaves.com/uk/home.asp; 24$logger.log( Result: Passed) 25 else 26$logger.log( Result: Failed) 27 end 28 end 29 30 end 31 #---# Output; ruby test_firefox_logging.rb Loaded suite test_firefox_logging Started log Starting XMLLogger... E Finished in 4.656 seconds. 1) Error: test_a(TC_go_to_homepage): NoMethodError: undefined method `set_logger' for #FireWatir::Firefox: 0x3383cb0 test_firefox_logging.rb:15:in `start' test_firefox_logging.rb:19:in `test_a' 1 tests, 0 assertions, 0 failures, 1 errors Exit code: 1 --~--~-~--~~~---~--~~ 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: Watir::IE.new - how does the IE object differ from a normal Windows IE instance?
The Watir IE object is instantiated through OLE (I believe or it could be COM), which is done over a server-like connection, whereas running IE actually starts the entire program from executable. This may not be entirely correct though, as I do not fully understand how OLE or COM work. IE is tightly integrated into the system however, for example if you were to open an Explorer window, normally used to browse files on your local system, and enter the HTTP address to a web site in the address bar, the Explorer window would become an Internet Explorer window. There are likely some differences between running IE as an executable and running IE as an OLE object, but what they are is not known to me. It may also be possible that the redirects caused by Google aren't always necessary and don't occur in certain situations. You might dig more in that direction. Why is Google redirecting in up to ten different ways? Those are my thoughts. Nathan On Mon, May 11, 2009 at 8:16 PM, Jason freezingki...@gmail.com wrote: The question: how does the Internet Explorer object created via Watir (Watir::IE.new) differ from an Internet Explorer object opened the traditional way via Windows? I'm not sure it's supposed to be different, but I'm observing the following: We've created some AB testing variations using the Google Website Optimizer. The root page has 10 different variations. When loading the root page within IE as loaded via Windows (C: \Program Files (x86)\Internet Explorer\iexplore.exe) the root page effectively redirects to any of the 10 variants - ./0/ through to ./ 9/. i.e. http://{website}.com/9/ When loading the root page via an IE instance created via IRB ( Watir::IE.new or Watir::IE.start() ) this simply doesn't occur. The redirect to ./x/ doesn't happen, the page stays at the root. There's some javascript within the page that should assist this redirection and it simply doesn't appear to happen. By all other accounts the page is functionally correct, i.e. all other javascript loads and functions as expected. I'm worried the implementation of the AB variations may not be exactly correct, but is there something obvious about the Watir IE instance I don't understand? Is the Watir IE object different in any obvious way to a 'normal' Windows IE object that might cause this? -- Nathan Lane Home, http://www.nathandelane.com Blog, http://nathandelane.blogspot.com --~--~-~--~~~---~--~~ 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] Traversing nested elements
Hello everyone, I have a website that is generated dynamically (jsp). I would like to use the help of Watir to traverse through all of the many levels of nested tables/links in this site. The problem is that I can't be certain about the attributes (name, id) of the tables/links because when the server updates, the content changes. The depth of the nesting and the width(number of elements) of the branching and the type of the elements are not known in advance. For example, you have tr td a /a /td /tr or sometimes tr td tr td a /a /td td a /a /td /tr /td /tr The links are nested in the table and I want to click all these links using Watir, but not other links on the page, (only the ones in the table). I'm still very new to Watir. Is it the right tool for this task? Million thanks. --~--~-~--~~~---~--~~ 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] Job Opportunity at Columbus, OH
Hi all, One of my clients is dire need of a QA Engineer with deep understanding and experience in Watir. Please email Leah at lgeo...@everesttech.com with your interest or any referrals. Thanks Leah --~--~-~--~~~---~--~~ 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: How can we take screen shot when error occurs?
Sorry, that second $ie, should be ie to match your browser object, like this: t = Thread.new(){ ie.button(:name, searchSub).click } m = Thread.new(ie) { screen_capture(keywordserror.jpg,true) } m.join t.join --~--~-~--~~~---~--~~ 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: Watir::IE.new - how does the IE object differ from a normal Windows IE instance?
You can also try Watir::IE.new_process, which starts IE using a different mechanism, closer to what happens when you start it manually. Bret Jason wrote: The question: how does the Internet Explorer object created via Watir (Watir::IE.new) differ from an Internet Explorer object opened the traditional way via Windows? I'm not sure it's supposed to be different, but I'm observing the following: We've created some AB testing variations using the Google Website Optimizer. The root page has 10 different variations. When loading the root page within IE as loaded via Windows (C: \Program Files (x86)\Internet Explorer\iexplore.exe) the root page effectively redirects to any of the 10 variants - ./0/ through to ./ 9/. i.e. http://{website}.com/9/ When loading the root page via an IE instance created via IRB ( Watir::IE.new or Watir::IE.start() ) this simply doesn't occur. The redirect to ./x/ doesn't happen, the page stays at the root. There's some javascript within the page that should assist this redirection and it simply doesn't appear to happen. By all other accounts the page is functionally correct, i.e. all other javascript loads and functions as expected. I'm worried the implementation of the AB variations may not be exactly correct, but is there something obvious about the Watir IE instance I don't understand? Is the Watir IE object different in any obvious way to a 'normal' Windows IE object that might cause this? -- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord Ask me about Watir training www.watircraft.com/training --~--~-~--~~~---~--~~ 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: Traversing nested elements
not sure if this helps - but it might be a start ff.tables.each do |table| table.links.each do |link| link.click #for example end end hope that helps. On 12 Mai, 15:49, Gofu thanapoom.chareons...@gmail.com wrote: Hello everyone, I have a website that is generated dynamically (jsp). I would like to use the help of Watir to traverse through all of the many levels of nested tables/links in this site. The problem is that I can't be certain about the attributes (name, id) of the tables/links because when the server updates, the content changes. The depth of the nesting and the width(number of elements) of the branching and the type of the elements are not known in advance. For example, you have tr td a /a /td /tr or sometimes tr td tr td a /a /td td a /a /td /tr /td /tr The links are nested in the table and I want to click all these links using Watir, but not other links on the page, (only the ones in the table). I'm still very new to Watir. Is it the right tool for this task? Million thanks. --~--~-~--~~~---~--~~ 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] javascript popup window not responding to startClicker
I am on a mac and linux with firefox so i cannot use this Autoitx thing that everyone seems to be using to click away javascript popups when then they appear. the code below works most of the time - but for some reason no the website http://www.stepstone.de The pop appear - but it does not get clicked away.!! any ideas out there?? ff = FireWatir::Firefox.new ff.goto(http://www.stepstone.de;) ff.startClicker(ok) ff.frame(:name, maincontent).frame(:name, content).image(:name, Search).click Thanks a million. Jason. --~--~-~--~~~---~--~~ 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: Unable to attach to a page on makemytrip
I added a 30 second sleep because the page is still processing info when it loads and the button does not exist and it worked fine for me. You might not need to wait that long just the first value I tried. require 'watir' ie=Watir::IE.new ie.goto(www.makemytrip.com) ie.link(:href,http://www.makemytrip.com/international-flights/;).click ie.text_field(:id,departure_0).set(Delhi,India-Indira Gandhi Intl(DEL)) ie.text_field(:id,arrival_0).set(Chicago,US-All airports-IL(CHI)) ie.image(:src,http://www.makemytrip.com/images/search-for-flights.gif ).click sleep 30 ie.image(:src, http://cheapfaresindia.makemytrip.com/international/img/us/booknow.gif ).click Thanks, Eric On Mon, May 11, 2009 at 11:55 PM, Pallavi Sharma write2pall...@gmail.comwrote: Nothing happens. Anyone here, could you please help. Need a solution badly. On Mon, May 11, 2009 at 7:48 PM, Ravi myrav...@gmail.com wrote: Insert the following line after clicking search-for-flights.gif: Watir::Waiter.wait_until{ie.image(:src,http:// cheapfaresindia.makemytrip.com/international/img/us/ booknow.gif).exist?} On May 11, 1:56 am, Pallavi Sharma write2pall...@gmail.com wrote: You are right Santosh, this is exactly the problem, i was trying to potray but thanks for making it clear, watir gets hanged after executing the second last step. No step after it gets executed. On Mon, May 11, 2009 at 12:15 PM, SANTOSH SOLAPURKAR sansolapur...@gmail.com wrote: Hi All, This doent seem to be frame or other issue at all, what i see this as there is a problem with the website itself. once we do the search for the international flights the web page doesnot completely load, as in eventhough it shows done it still keeps on downloading some thing probably javascript namely sort(5). To test this you can do a simple test. after the ie.image(:src, http://www.makemytrip.com/images/search-for-flights.gif;).click statement put a puts command to print some thing and run the script. this still hangs and doenot print any thing on console . require 'watir' ie=Watir::IE.new ie.speed=:fast ie.goto(www.makemytrip.com) ie.link(:href,http://www.makemytrip.com/international-flights/ ).click ie.text_field(:id,departure_0).value=Delhi,India-Indira Gandhi Intl(DEL) ie.text_field(:id,arrival_0).value=Chicago,US-All airports-IL(CHI) ie.image(:src, http://www.makemytrip.com/images/search-for-flights.gif;).click #This works, after which IDE hangs puts the page has loaded # This never gets executed.. #ie.image(:src, http://cheapfaresindia.makemytrip.com/international/img/us/booknow.gif ).click #DOESNT GET EXECUTED I dont know how to resolve this but need to stop the java script from downloading . Hope we resolve this.. Cheers, Santosh On Mon, May 11, 2009 at 11:02 AM, Pallavi Sharma write2pall...@gmail.comwrote: Hi Everyone require 'watir' ie=Watir::IE.new ie.speed=:fast ie.goto(www.makemytrip.com) ie.link(:href,http://www.makemytrip.com/international-flights/ ).click ie.text_field(:id,departure_0).value=Delhi,India-Indira Gandhi Intl(DEL) ie.text_field(:id,arrival_0).value=Chicago,US-All airports-IL(CHI) ie.image(:src, http://www.makemytrip.com/images/search-for-flights.gif;).click #This works, after which IDE hangs ie.image(:src, http://cheapfaresindia.makemytrip.com/international/img/us/booknow.gif ).click #DOESNT GET EXECUTED Thanks for the reply so far, but i just want to clear my understanding, The last step of the above script is not getting executed, the reason for it is because 'watir' is not able to access the frames on the page. But I have checked with IE Devloper tool bar there are no frames on the Search Result page, which you get after you execute the second last step of the script. I am sorry, if i am missing something out from the answers i have recieved sod far, but i am not able to understand why this above script is not getting executed. Meanwhile i have tried the above on 5 different machines, but it doesn't works. On Sun, May 10, 2009 at 6:14 AM, Vicky Goyal vikasrattango...@gmail.comwrote: @Pallavi As siva has mentioed, tht same defect is already open. If you are not able to see the frames of a link in command bar, you will not be able to access the objects in that link. not very sure, i guess this s because some latest patches might be missing from our personal desktops. As when i tried in my organization, infosys, same was wrking. Now what you can do is to access those links, you can use Firefox browser, that should not give any issues. siva has tried the script, though i am sturuggling right now to install the latest version for same. hope this helps regds Vicky Vikas Rattan Goyal Test Lead, Telecommunication Infosys Tech Ltd On May 9,
[wtr-general] Re: Insallation issue
Vicky - Are you behind a proxy? Alan -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Vicky Goyal Sent: Sunday, May 10, 2009 3:56 PM To: Watir General Subject: [wtr-general] Re: Insallation issue Both the options did nt wrk as i m typing gem update --system i get response as C:\Documents and Settings\admingem update --system Updating RubyGems... Bulk updating Gem source index for: http://gems.rubyforge.org And this remains like eternity :):):) any clue or is there any other way i can install WATIR 1.6 version, any exe downloable file.. Pls suggest On May 10, 6:05 am, sHiVa krapa.ph...@gmail.com wrote: Hi Vicky, When you try the both commands, to install Watir, any of the below two things might be happen 1. If you get invalid gem format error -- Please disable the antivirus, and firewall settings (I faced the same in my company) 2. If the script is keep on downloading gems means, system update is big in size. Wait for some more time (After completion of system -- update, a series of notes with successfully updated message will be displayed. Regards Siva Phaneendra Krapa --~--~-~--~~~---~--~~ 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: file download popup handle
Could you please tell me where in my code I change / add the code you are suggesting?? Would you please update my code with your suggestion?? I am pretty new to WATIR..and I really am not sure what to do with your suggestion.. Your help will be deeply appreciated. Thank you. On May 12, 12:32 am, kiran gki...@gmail.com wrote: Hi, Use Clik_no_wait instead of click and use threads.its something like this t=Thread.new{ file_download_code} t.join() Thnaks, kiran. On May 12, 9:36 am, curious csamigr...@gmail.com wrote: I put below code in order to automate file download popup.. ie.button(:name, Button5).click . when WATIR reaches above code.. File download popup shows up.. and the code below should handle this popup and save the file to be downloaded.. however, the code is just sitting there.. 'File download' popup shows up.. but it is not going anywhere.. the file download popup just stays on.. and below code is not handling saving the file.. what am I doing wrong?? Could anyone please tell me how I should adjust the code below in order to automate File download process?? thanks. prompt_message = Do you want to open or save this file? window_title = File Download save_dialog = WIN32OLE.new(AutoItX3.Control) sleep 1 save_dialog_obtained = save_dialog.WinWaitActive (window_title,prompt_message, 25) save_dialog.ControlFocus(window_title, prompt_message, Save) sleep 1 save_dialog.Send(S) save_dialog.ControlClick(window_title, prompt_message, Save) save_dialog.WinSetTitle(window_title, prompt_message, This is ForTesting ) saveas_dialog_obtained = save_dialog.WinWait(Save As, Savein, 5) sleep 1 path = File.dirname(__FILE__).gsub(/ , \\ )+ \\ + fileName save_dialog.ControlSend(Save As, , Edit1,path) sleep 4 save_dialog.ControlClick(Save As, Save in, Save) save_fileAlreadyExists = save_dialog.WinWait(Save As, , 5) def save_file(filepath) ai = WIN32OLE.new(AutoItX3.Control) ai.WinWait(File Download, , 5) ai.ControlFocus(File Download, , Save) sleep 1 ai.ControlClick(File Download, , Save, left) ai.WinWait(Save As, , 5) sleep 1 ai.ControlSend(Save As, , Edit1,filepath) ai.ControlClick(Save As, , Save, left) ai.WinWait(Download complete, , 5) ai.ControlClick(Download complete, , Close) end- 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: Insallation issue
@alan Thanks for writing in.. i am working on personal desktop , so there is no proxy server, but i found out few virus on my sys... so tht could be one reason.. way say.. currenly i m wokrin with watir 1.4 , atleast i can learn basic. May be in a week or so, i shal try again with new watir version i got one exe file for watir1.4 so , executing tht file, i m workin rright now. On Tue, May 12, 2009 at 11:14 PM, Alan Baird alan.ba...@riskmetrics.comwrote: Vicky - Are you behind a proxy? Alan -Original Message- From: watir-general@googlegroups.com [mailto: watir-gene...@googlegroups.com] On Behalf Of Vicky Goyal Sent: Sunday, May 10, 2009 3:56 PM To: Watir General Subject: [wtr-general] Re: Insallation issue Both the options did nt wrk as i m typing gem update --system i get response as C:\Documents and Settings\admingem update --system Updating RubyGems... Bulk updating Gem source index for: http://gems.rubyforge.org And this remains like eternity :):):) any clue or is there any other way i can install WATIR 1.6 version, any exe downloable file.. Pls suggest On May 10, 6:05 am, sHiVa krapa.ph...@gmail.com wrote: Hi Vicky, When you try the both commands, to install Watir, any of the below two things might be happen 1. If you get invalid gem format error -- Please disable the antivirus, and firewall settings (I faced the same in my company) 2. If the script is keep on downloading gems means, system update is big in size. Wait for some more time (After completion of system -- update, a series of notes with successfully updated message will be displayed. Regards Siva Phaneendra Krapa -- With Regards, Vikas Rattan Goyal Pune 09922052873 One life , live to fullest --~--~-~--~~~---~--~~ 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] Roo error on Ubuntu 9.04
Hi all, After installing ruby, rubygems, firewatir, which all seems working fine, i would like to create some datadriven scripts with roo (to access spreadsheets). But when i tried to install roo sudo gem install roo i got the following: sudo gem install roo [sudo] password for yellowbug: Building native extensions. This could take a while... ERROR: Error installing roo: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb install roo extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) from extconf.rb:1 Gem files will remain installed in /var/lib/gems/1.8/gems/ hpricot-0.8.1 for inspection. Results logged to /var/lib/gems/1.8/gems/hpricot-0.8.1/ext/ hpricot_scan/gem_make.out On this link i found out that installing ruby on Linux has some issues, not everything is included in the default ruby install. http://blogs.law.harvard.edu/hoanga/2006/10/27/fixing-mkmf-load-error-ruby-in-ubuntu/comment-page-1/ So after sudo apt-get install ruby1.8-dev roo installed properly. But the happy-happy-joy-joy was short, trying the roo examples i've got the following: irb(main):001:0 require 'rubygems' = true irb(main):002:0 require 'roo' LoadError: no such file to load -- net/https from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/GData-0.0.4/lib/gdata/base.rb:2 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/GData-0.0.4/lib/gdata/spreadsheet.rb:1 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/roo-1.2.3/lib/roo/google.rb:1 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/roo-1.2.3/lib/roo.rb:10 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require' from (irb):2 Help wanted! Or does somebody know another trick to access OpenOffice Calc sheets on Linux? Grtz. Richard Wijdenes --~--~-~--~~~---~--~~ 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: Roo error on Ubuntu 9.04
I think that means you need t install the ssh libraries. openssh maybe. Cant rememeber exactly im afraid Paul On Tue, May 12, 2009 at 4:22 PM, Richard Wijdenes richard.wijde...@gmail.com wrote: Hi all, After installing ruby, rubygems, firewatir, which all seems working fine, i would like to create some datadriven scripts with roo (to access spreadsheets). But when i tried to install roo sudo gem install roo i got the following: sudo gem install roo [sudo] password for yellowbug: Building native extensions. This could take a while... ERROR: Error installing roo: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb install roo extconf.rb:1:in `require': no such file to load -- mkmf (LoadError) from extconf.rb:1 Gem files will remain installed in /var/lib/gems/1.8/gems/ hpricot-0.8.1 for inspection. Results logged to /var/lib/gems/1.8/gems/hpricot-0.8.1/ext/ hpricot_scan/gem_make.out On this link i found out that installing ruby on Linux has some issues, not everything is included in the default ruby install. http://blogs.law.harvard.edu/hoanga/2006/10/27/fixing-mkmf-load-error-ruby-in-ubuntu/comment-page-1/ So after sudo apt-get install ruby1.8-dev roo installed properly. But the happy-happy-joy-joy was short, trying the roo examples i've got the following: irb(main):001:0 require 'rubygems' = true irb(main):002:0 require 'roo' LoadError: no such file to load -- net/https from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/GData-0.0.4/lib/gdata/base.rb:2 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/GData-0.0.4/lib/gdata/spreadsheet.rb:1 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/roo-1.2.3/lib/roo/google.rb:1 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/roo-1.2.3/lib/roo.rb:10 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require' from (irb):2 Help wanted! Or does somebody know another trick to access OpenOffice Calc sheets on Linux? Grtz. Richard Wijdenes --~--~-~--~~~---~--~~ 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: Watir::IE.new - how does the IE object differ from a normal Windows IE instance?
Brett, thanks. Unfortunately, but interestingly, that doesn't make a difference. On May 13, 3:17 am, Bret Pettichord b...@pettichord.com wrote: You can also try Watir::IE.new_process, which starts IE using a different mechanism, closer to what happens when you start it manually. 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir::IE.new - how does the IE object differ from a normal Windows IE instance?
I think I need to dig around and understand these redirections, but they're basically related to AB variation testing... Thanks for your thoughts! Jason On May 13, 1:20 am, Nathan Lane nathamberl...@gmail.com wrote: The Watir IE object is instantiated through OLE (I believe or it could be COM), which is done over a server-like connection, whereas running IE actually starts the entire program from executable. This may not be entirely correct though, as I do not fully understand how OLE or COM work. IE is tightly integrated into the system however, for example if you were to open an Explorer window, normally used to browse files on your local system, and enter the HTTP address to a web site in the address bar, the Explorer window would become an Internet Explorer window. There are likely some differences between running IE as an executable and running IE as an OLE object, but what they are is not known to me. It may also be possible that the redirects caused by Google aren't always necessary and don't occur in certain situations. You might dig more in that direction. Why is Google redirecting in up to ten different ways? Those are my thoughts. Nathan --~--~-~--~~~---~--~~ 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: Roo error on Ubuntu 9.04
You could try adding require 'open-uri' and see if that helps. net/http, net/https, etc are part of that lib and maybe it's not required by default on Ubuntu? I don't have an install of that handy or I'd check. Worse case (hacky) you can manually modify roo.rb in the installed package and comment out the line require 'roo/google' which means you can't use Google spreadsheets but the others should be fine. Let me know how this goes for you. --~--~-~--~~~---~--~~ 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: Problems dealing with javascript popups
Please don't put your eyes on the rare cases, but on the most important part. When we can do our most automation test in Watir, we think it is perfect. Do you think so? Thanks. Wesley Chen. On Tue, May 12, 2009 at 8:18 PM, SushilKarwa sushil.ka...@gmail.com wrote: Thanks for your help. I was able to successfully get the alert box and click on the OK button with the code you provided... Would this still work if there are multiple alert boxes..I mean after I click OK on the first box and then another one appears..Would this still handle that... Thanks, S.K On May 12, 1:51 pm, kiran gki...@gmail.com wrote: Please tell me still if you have any issues. Thanks, kiran. On May 12, 1:46 pm, kiran gki...@gmail.com wrote: I have used the below code and it worked fine in my project. Thread.new{ sleep(3) # put appropriate sleep time Watir.autoit.WinWait(Title name) Watir.autoit.WinActivate(Title name) Watir.autoit.Send(username) Watir.autoit.Send('{TAB}') Watir.autoit.Send(password) Watir.autoit.Send('{ENTER}') } ie.goto(url) Thanks, kiran. On May 12, 12:34 pm, SushilKarwa sushil.ka...@gmail.com wrote: Its still not working for me. I tried creating a new thread.. But when the pop up occurs, it just hangs and doesn't proceed further until I manually click on the OK button... Any other way to get rid if this problem... Regards, S.K On May 12, 10:54 am, kiran gki...@gmail.com wrote: Hi, Use threads,it may help. some thing like this t=Thread.new{ pop-up code} t.join Thanks, kiran. On May 12, 10:13 am, SushilKarwa sushil.ka...@gmail.com wrote: Any help is much appreciated Regards, S.K On May 11, 6:12 pm, SushilKarwa sushil.ka...@gmail.com wrote: Hi Group, I am struggling to handle the JavaScript popups. Let me explain my scenario to you guys. In my web application am executing certain URL. Once that url is executed it pops up a javaScript alert box. From within the same browser window I need to click on the ok button to get out of that box. But it doesnt seem to be happening. My test is if I get a pop up then FAIL else PASS the test. I have been using the following code in my main program. test.goto(http://example.com/sample.do?param1=abc,param2=xyz ) check_for_popup(Windows Internet Explorer,OK).should == false) and my check_for_popup is something like this def chk_for_popups(title,button) puts(In popups method...) autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(title,,1) if (ret==1) puts There is pop up. autoit.WinActivate(title) button.downcase! if button.eql?(ok) || button.eql?(yes) || button.eql? (continue) autoit.Send({Enter}) else autoit.Send({tab}) autoit.Send({Enter}) end return true elsif (ret==0) puts No pop up. return false end end Now the problem is when I execute the URL, its not entering the check_for_popup(). Only when I manually click OK button on the alert box, it enters this method, which is kind of confusing. Not sure why is this happening... Could anybody help me solving this issue.. Thanks in advance, S.K --~--~-~--~~~---~--~~ 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: Checking form controls/fields using a hash
Hi everybody, I figured I should close out this thread with a good (well, I guess that's relative) solution to my problem: company_name = $ie.text_field(:id, CompanyName) username = $ie.text_field(:id, username) password = $ie.text_field(:id, password) page_hash = {company_name = Company Name text field, username = User name text field, password = Password text field} page_hash.each_pair do |k,v| puts k.exists? ? #{v} is present. : #{v} is not present end Hope this helps... -George On Apr 3, 8:16 am, Paul Rogers paul.rog...@shaw.ca wrote: your keys are the methods, so this might be what you need contact_controls.each do |k,v| if eval(k).exists? puts its there else puts oh no end end On Fri, Apr 3, 2009 at 8:06 AM, George george.sand...@gmail.com wrote: This is what I tried initially (see my first post). Hashes do not allow the exists? method, and it looks like has_key? only checks the key in the hash (not the actual text field on the webpage). Any other ideas? :) On Apr 2, 8:23 pm, Paul Rogers paul.rog...@shaw.ca wrote: I think ( i didnt look too hard ) that it will only see if the key is there, this might be what you want contact_controls.each do |k,v| if k.exists? puts its there else puts oh no end end Pau On Thu, Apr 2, 2009 at 7:58 PM, George george.sand...@gmail.com wrote: Thanks, Paul! For those who are interested, this part of the code worked for me: contact_controls.each do |key, value| if contact_controls.has_key?(key) puts PASS: Control #{value} exists. else puts FAIL: Unable to locate control #{value} end end I thought I should ask, just to make certain: With the code I'm presenting above, does this actually check the existence of the form control, or is it merely checking that a value exists in the hash? On Apr 2, 2:40 pm, Paul Rogers paul.rog...@shaw.ca wrote: hash has a has_key? method Paul On Thu, Apr 2, 2009 at 3:30 PM, George george.sand...@gmail.com wrote: Hello everyone, I'm hoping this is the right forum for this question. I'm trying to iterate through a hash and check certain text fields on a webpage: Here is where I'm storing my controls: controls.rb # stores the form control variables === def tf_company_name $tf_company_name = $ie.text_field(:id, CompanyName) end def tf_address $tf_address = $ie.text_field(:id, StreetAddress) end def tf_city $tf_city = $ie.text_field(:id, City) end Here is where I'm defining the iteration: form_checks.rb # Check form controls === def check_contact_form_controls contact_controls = [tf_company_name = Company Name, tf_address = Address, tf_city = City] contact_controls.each do |key, value| if key.exists? puts PASS: Control #{value} exists. else puts FAIL: Unable to locate control #{value} end end end Since hashes does not have an exists? method, I get an error. Is there a better way to do this? Thanks, George --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---