Re: [Wtr-general] How to clear the cache of the browser?
On 3/6/07, swarna latha [EMAIL PROTECTED] wrote: Can we do a keyword based search on the Wtr general archive list? There is answer in FAQ. http://wiki.openqa.org/display/WTR/FAQ#FAQ-Searchingthemailarchives There is search form at http://wtr.rubyforge.org/ http://www.mail-archive.com/wtr-general%40rubyforge.org/ http://forums.openqa.org/forum.jspa?forumID=5 -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Accessing a dhtml menu
Hi all, I'm having a bit of trouble accessing menu drop downs which are created by using ie's createPopup method. I've got an application that has some divs, which then get shoved into the content of a popup/menu item. div myonclick=parent.callFunction('foo';'something'), . On clicking the myonclick gets converted into an onclick method and everything gets pushed into the div tags of a popup called through window.createPopup. I can't seem to access the popup menu after clicking on it. I may be missing something simple, but figured I'd ask the list. -Charley ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to clear the cache of the browser?
Someone posted a Ruby snippet here which will clear the IE cache: http://rubyforge.org/snippet/detail.php?type=snippetid=26 I've used it from time to time and it seems to work fine. It uses functions from the MS WinINet API to walk the cache and delete each item. Thanks Bill On 3/5/07, swarna latha [EMAIL PROTECTED] wrote: Before launching a web page , I need to clear the cache / temp files/cookies of the browser. How can I do it ? Can we do a keyword based search on the Wtr general archive list? I seem to find it a bit difficult to go through archive (2004 to 2007) everytime ...maybe I am missing something obvious.. Thanks for the help. Swarna. 8:00? 8:25? 8:40? Find a flick in no time with theYahoo! Search movie showtime shortcut. ___ 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] PopUp window problem
If we're not dealing with a modal dialog, but an actual new window, often Watir doesn't wait correctly since it's only worrying about whether the current window is done loading, not what the pop-up is doing. Here's my fix: def get_popup(how, what) tries = 100 popup = nil until popup do begin sleep(0.1) popup = IE.attach(how, what) rescue = e raise e if (tries -= 1) = 0 end end popup end @ie_popup_window = get_popup(:title, /Drive Admin/) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6726messageID=19599#19599 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Excel Interface Class - extend to openoffice/google spreadsheets
I currently don't have the time/motivation to extend the excel interface class to work with Open Office and Google spreadsheet, however, If someone really needs to do this it shouldn't be too difficult. Only the following methods of the XLS class contain excel specific commands that would need to be overridden: -Initialize()#opens an excel file -getRangebyLabel()#finds a range of data dynamically -getWorksheet()#finds a worksheet to use -get2DArray()#returns a 2D array of data based on a given range and worksheet name. -David Brown -- From: Paul Rogers [EMAIL PROTECTED] I use Open Office. Having the Excel reader is handy, but it obviously doesnt work for me. I started working on some code that would read open office spreadhseet files. It would be great if you could make it work on both, with the same interface, especially as things like firewatir and safari watir work well on non windows platforms. The open office format is an xml file in a zip, and its actually quite easy to work with. I can send you my code if you like Paul ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] 'ie.close' or 'ie.close if ie'
Hello, I am new to Ruby/watir ... so forgive me plz. After reading through the ie window threads, I am still puzzled how to create a single ie browser for my test. Questions: 1) If there is one browser instance for the test, how is one to close the browser at the end of the test? Should a test_closebrowser() method be created at the end? 2) When using this example, I am finding that the @ie instance variable is nil at the beginning of each test method. Isn't the instance variable supposed to be persistent throughout all of the tests? 3) I looked through the examples, but couldn't find an example of the IE.attach() method. Should I keep track of the window handle when the instance is created and just reference that throughout the test? Thanks in advance Here is a simple example require 'watir' require 'test/unit' class My_TestCase Test::Unit::TestCase # Instance variables @ie = nil def test_01_initialtest # create a new browser for the test (if necessary) @ie = Watir::IE.new if @ie == nil # do some work ... end def test_02_secondtest # create a new browser for the test (if necessary) @ie = Watir::IE.new if @ie == nil # do some work ... end end - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6562messageID=19604#19604 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Excel Interface Class
Hi, I am unable to access the links http://wiki.openqa.org/display/WTR/Excel+interface+class and http://wiki.openqa.org/display/WTR/FAQ and I think it would be of great help to me if I can! It gives me Page cannot be displayed error. I have been trying to access it since the last 2 days..:( Any ideas why? Thanks Billy for the code snippet pointer to clear cache issue. Thanks, Swarna. I've posted an Excel Interface class which I've developed over the past few months on the Watir openqa.org site under contributions: http://wiki.openqa.org/display/WTR/Excel+interface+class This class provides simple methods for reading data records from Excel spreadsheets, hides the complexities of directly using ruby's win32ole library to interface with Excel, and makes it much easer to create data-driven Watir tests. I hope it will be as useful to others as it has been for me. -David Brown ___ Wtr-general mailing list Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] OT: The original problem. Re: A small doubt in Ruby
Apparently inside an each loop you're only working on a copy of the item, not the item itself, so to_s isn't actually working on the real items in the array. This is not true. The problem is not that you have a copy, but rather that your reference ('item) is local to the block. Changing it doesn't change anything outside the block. The problem isn't with what you are given in the block, but rather with what you are doing with it. aoa = [[1,2,3],[4,5,6]] aoa.each do |arr| arr.each do |item| item = item.to_s end To make this work, you have to use map: aoa.each do |arr| arr.map! do |item| item = item.to_s end Note that item is a local variable and that therefore changing its value has absolutely no effect. In other words, this code does exactly the same thing: aoa.each do |arr| arr.map! do |item| item.to_s end Your post suggested that map! increases the scope of the bound variable. But actually what it does is replace the item in arr with the value returned by the block. A side effect of assignment is that it returns the value, and that is what is actually doing the work. Bret - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6791messageID=19606#19606 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Calling Definition again!
Please post some Ruby code that demonstrates your problem. What you posted was pseudo-code and I was not able to follow it. Please post code that we can run, so we can see your problem. Bret - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6734messageID=19607#19607 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5
Do we have a timeline on when this will work in 1.8.5? Is anyone working on this? I don't believe any one is working on it right now. The simple solution would be to merge our changes to the WIN32OLE library into the 1.8.5 version and recompile it. But then we'd have the same problem again with 1.8.6. The better solution would be to rewrite our IEDialog.dll so that it did not require a modified WIN32OLE. If there is work on Watir that you would like to see done, please vote for the corresponding Jira ticket. Bret - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6733messageID=19608#19608 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general