Re: [Wtr-general] hi, not able to use assert
Hi Maloy, A snippet of code was provided yesterday. Did you see this code? Does this code not work? Do you have questions about the code? Are you executing this via IRB or someting like Eclipse? Have you executed any of the unit tests? Do the assertions work for the unit tests? Thanks, Carl ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to access a modal dialog box to select a
It sounds like it is not a web modal dialog, which is what our advice is for, but rather a windows modal dialog. If so, i suggest using AutoIt. Bret - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357messageID=18014#18014 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Everyday Scripting with Ruby (the book)
I am curious what everyone thinks of this (new) book. It starts off well, with the first example tutorial being how to test if an uninstaller worked. No hello world, silly arithmetic examples etc. Well it is ordered, I will know myself soon. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Everyday Scripting with Ruby (the book)
On 2/1/07, Richard Conroy [EMAIL PROTECTED] wrote: I am curious what everyone thinks of this (new) book. It starts off well, with the first example tutorial being how to test if an uninstaller worked. No hello world, silly arithmetic examples etc. Well it is ordered, I will know myself soon. I've ordered one also. I was a reviewer for the early drafts of the book, which were very good, I'm looking forward to seeing how the final version came out! ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Everyday Scripting with Ruby (the book)
Richard Conroy wrote: I am curious what everyone thinks of this (new) book. It starts off well, with the first example tutorial being how to test if an uninstaller worked. I'm hooked. Brian's no slacker, and he started with the T-word! -- Phlip http://c2.com/cgi/wiki?ZeekLand -- NOT a blog!! ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Everyday Scripting with Ruby (the book)
I didnt enjoy the early drafts too much, but with Brian Marrick as the author, you know its going to be full of useful stuff. I was checking the prag programmers site daily for it to come out. - Original Message - From: Richard Conroy [EMAIL PROTECTED] To: wtr-general@rubyforge.org Sent: Thursday, February 01, 2007 8:30 AM Subject: [Wtr-general] Everyday Scripting with Ruby (the book) I am curious what everyone thinks of this (new) book. It starts off well, with the first example tutorial being how to test if an uninstaller worked. No hello world, silly arithmetic examples etc. Well it is ordered, I will know myself soon. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Is there a way to over ride Watir's checking if IE is busy?
I am trying to test a website that has streaming content, and it seems that because this content is streaming, IE never returns that it is no longer busy. Is there some way around this? I am unable to do anything on the site in these cases. Thanks, Nathan - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392messageID=18036#18036 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Is there a way to over ride Watir's checking if IE isbusy?
I had the same problem once too. Take a look at the wait method it has these lines while @ie.busy and until @ie.readyState == READYSTATE_COMPLETE do you might be able to remove or the other Paul - Original Message - From: Nathan [EMAIL PROTECTED] To: wtr-general@rubyforge.org Sent: Thursday, February 01, 2007 12:56 PM Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE isbusy? I am trying to test a website that has streaming content, and it seems that because this content is streaming, IE never returns that it is no longer busy. Is there some way around this? I am unable to do anything on the site in these cases. Thanks, Nathan - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392messageID=18036#18036 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Is there a way to over ride Watir's checking if IE is busy?
To add a little bit of information, when I use irb to test my script's actions, I don't get timeouts, but when I am running the script, which activates a javascript menu, then clicks on a link in that menu, and I am on a page that is streaming video, I continually get timeouts, even when the video stops playing. Nathan - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392messageID=18037#18037 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] url for link
On 1/31/07, Bret Pettichord [EMAIL PROTECTED] wrote: ie.link(:html, /contract_id=227/).click Once more, this is so cool. -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Is there a way to over ride Watir's checking if IE isbusy?
So basically the test never starts because IE is never finished loading the items on the page? I've witnessed this also with slow-loading images on our staging servers. IE hangs out (no pun intended) until the final image shows and then tests away. It may be a low-tech resolution, but if I'm not testing the images, for instance, I go into IE setting and disable images from showing before I run my tests. You could also easily do this with streaming/multimedia content in Tools - Internet Options - Advanced. So, as long as you're not testing the functionality of the streaming content that should allow the test to run. If you are, it may be the one component that you have to test manually. That's my non-watir-specific .02. Thanks, Adam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nathan Sent: Thursday, February 01, 2007 1:57 PM To: wtr-general@rubyforge.org Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE isbusy? I am trying to test a website that has streaming content, and it seems that because this content is streaming, IE never returns that it is no longer busy. Is there some way around this? I am unable to do anything on the site in these cases. Thanks, Nathan - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392messageID=18036#18036 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] url for link
On 1/30/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote: a href=# onclick=new Ajax.Request('/data_entry/ajax_add_term/131?contract_id=227', {asynchronous:true, evalScripts:true}); return false;add a term/a Can regular expressions be used with xpath? This does not work. ie.link(:xpath, //[EMAIL PROTECTED]'#{/227/}']/).click Watir::Exception::UnknownObjectException: Unable to locate object, using xpath and //[EMAIL PROTECTED]'(?-mix:227)']/ -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Is there a way to over ride Watir's checking if IE is busy?
Yes, i think this should work. I have never tried this and I can assure you that it will break way more things then it could ever fix :) module Watir class IE def wait puts 'hello' end end end - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392messageID=18044#18044 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] hi, not able to use assert
hi, thanks for your reply. I have used your code but after using it also i got an error c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__': No such file to load -- /apps/ruby/lib/ruby/1.8/test/unit (LoadError). When I modified your code as the following require 'watir' include Watir require 'watir/assertions.rb' @ie = IE.new @ie.goto(http://www.google.com;) assert(@ie.link(:text, Make Google Your Homepage!).exists?) @ie.link(:text, Make Google Your Homepage!).click and executed it, the following error occured: undefined method `assert' for #Object:0x27b9258 (NoMethodError) I am using the editor which is given by ruby SCiTE.No i have not executed any of the unit tests thank you, maloy - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6352messageID=18051#18051 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to handle the popup security alert
The following code shows a case using clearSecurityAlertBox(). --- require 'watir' # the watir controller include Watir require 'watir/winClicker' $ie = Watir::IE.new $ie.goto('https://10.101.4.69:4443') # create a new instance of WinClicker and use it wc = WinClicker.new wc.clearSecurityAlertBox() # other scripts # --- The result is that, IE status bar shows “Opening page https://10.101.4.69:4443 https://10.101.4.69:4443/ ”, and a “Security Alert” pops up. However, it will stop at this point, and not go further. Is there anything I missed? Regards, Jason From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker Sent: 2007年1月27日 1:52 To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert What error are you seeing? I wasn't saying to use IE 7 to bypass the problem, just mentioning the differences. If you could post a snippet of code and the error you're getting, that would be helpful. -Charley On 1/25/07, Jason He [EMAIL PROTECTED] wrote: I have tried several times and found that error returned when using clearSecurityAlertBox push_security_alert_yes. I searched the archived mailing list, not found an example showing how to make it happen. The Watir doesn't provider such examples too. Yes, we can use IE 7 to bypass this problem, but how to solve it when use Windows 2000 to do the test? (As we known Windows 2000 doesn't support IE 7) Regards, Jason From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] On Behalf Of Charley Baker Sent: 2007年 1月26 日 13:17 To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert You can use either/or. I'm working with AutoIt internally on our own version based off of WindowHelper which uses AutoIt. The only trick is adding support for IE 7, which instead of using popups, opens a new tab. -Charley On 1/24/07, Jason He [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I'm using https to do the test, and I want to push the security alert automatically when it popups, which of the following function is available? clearSecurityAlertBox (WinClicker) push_security_alert_yes (WindowHelper) Besides, is it necessary to judge whether that security alert popup? Regards, Jason ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Everyday Scripting with Ruby (the book)
I've ordered one also. I was a reviewer for the early drafts of the book, which were very good, I'm looking forward to seeing how the final version came out! Ditto. ** Everything in this e-mail and attachments relating to the official business of MultiChoice Africa is proprietary to the company. Any view or opinion expressed in this message may be the view of the individual and should not automatically be ascribed to the company. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and destroy the original message. ** ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Watir with Ajax
I can't send a link to my application as it is in my local host. I am sorry for this. The select option will be generating after i click on the link. Its ajax stuff. So that select can't be shown in the html. It is generating after the whole page is loaded. So wat should be done for such type of application?? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6378messageID=18056#18056 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to handle the popup security alert
The following code shows a case using push_security_alert_yes() --- require 'watir' # the watir controller include Watir require 'watir/WindowHelper' $ie = Watir::IE.new $ie.goto('https://10.101.4.69:4443') helper = WindowHelper.new helper.push_security_alert_yes() # other scripts # --- The result is the same as that of using clearSecurityAlertBox() method. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason He Sent: 2007年2月2日 12:38 To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert The following code shows a case using clearSecurityAlertBox(). --- require 'watir' # the watir controller include Watir require 'watir/winClicker' $ie = Watir::IE.new $ie.goto('https://10.101.4.69:4443') # create a new instance of WinClicker and use it wc = WinClicker.new wc.clearSecurityAlertBox() # other scripts # --- The result is that, IE status bar shows “Opening page https://10.101.4.69:4443 https://10.101.4.69:4443/ ”, and a “Security Alert” pops up. However, it will stop at this point, and not go further. Is there anything I missed? Regards, Jason From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker Sent: 2007年1月27日 1:52 To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert What error are you seeing? I wasn't saying to use IE 7 to bypass the problem, just mentioning the differences. If you could post a snippet of code and the error you're getting, that would be helpful. -Charley On 1/25/07, Jason He [EMAIL PROTECTED] wrote: I have tried several times and found that error returned when using clearSecurityAlertBox push_security_alert_yes. I searched the archived mailing list, not found an example showing how to make it happen. The Watir doesn't provider such examples too. Yes, we can use IE 7 to bypass this problem, but how to solve it when use Windows 2000 to do the test? (As we known Windows 2000 doesn't support IE 7) Regards, Jason From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] On Behalf Of Charley Baker Sent: 2007年 1月26 日 13:17 To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert You can use either/or. I'm working with AutoIt internally on our own version based off of WindowHelper which uses AutoIt. The only trick is adding support for IE 7, which instead of using popups, opens a new tab. -Charley On 1/24/07, Jason He [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I'm using https to do the test, and I want to push the security alert automatically when it popups, which of the following function is available? clearSecurityAlertBox (WinClicker) push_security_alert_yes (WindowHelper) Besides, is it necessary to judge whether that security alert popup? Regards, Jason ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Watir with Ajax
You can wait in a loop till the select box is loaded or use some kind of indicators like in gamil the top right corner of window reads Loading... when the mails are being loaded. In your case you can wait for the control itself #while the control exists is false sleep while(!ie.select_list( :name , criteria[1][type_id]).exists?) sleep(2) end #the select box is loaded now go ahead with other operations. If some text is displayed on the page as result of ajax call, you can also check for that while(!isMessageDisplayed(text displayed on page)) end #The Ajax control is loaded end Hope this helps. Prema On 2/2/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote: I can't send a link to my application as it is in my local host. I am sorry for this. The select option will be generating after i click on the link. Its ajax stuff. So that select can't be shown in the html. It is generating after the whole page is loaded. So wat should be done for such type of application?? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6378messageID=18056#18056 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] url for link
Hi, You can't use regular expression in xpath with XPATH 1.0, you can use it in XPATH 2.0 and rexml supports only xpath 1.0. You can use string operations like substring, string before, string after though. http://www.w3.org/TR/xpath#section-String-Functions. Prema On 2/2/07, Željko Filipin [EMAIL PROTECTED] wrote: On 1/30/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote: a href=# onclick=new Ajax.Request('/data_entry/ajax_add_term/131?contract_id=227', {asynchronous:true, evalScripts:true}); return false;add a term/a Can regular expressions be used with xpath? This does not work. ie.link(:xpath, //[EMAIL PROTECTED]'#{/227/}']/).click Watir::Exception::UnknownObjectException: Unable to locate object, using xpath and //[EMAIL PROTECTED]'(?-mix:227)']/ -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general