[wtr-general] Re: Access an object

2009-01-19 Thread Jarmo Pertman
Hello. As I answered to your question in Ruby-Forum, I'm going to paste the answer here also. I used different approach than xpath, since I've discovered that XPath in Watir+IE is really-really slow. I haven't benchmarked my current solution, but last time I tried something like

[wtr-general] Re: Eclipse is displaying the execution summary

2009-02-09 Thread Jarmo Pertman
Hello. I haven't noticed that Notepad++ is able to jump into module/class/ method declarations or maybe I just don't know how to use it? In NetBeans (and similar IDE-s) you can go with your cursor on some class name and hold down ctrl + click on the class name and you will be thrown to class

[wtr-general] Re: count the number of div elements (without divs.find_all)

2009-02-09 Thread Jarmo Pertman
try something like: puts $ie.html.scan(/div.*class\s*=\s*details/i).size pay attention to the part. If you get 0 results, try it with '. Also, it is possible that you have some with and some with ' if that's the case, then you should make this regular expression even more abstract. Anyway,

[wtr-general] Re: Sleep function

2009-03-12 Thread Jarmo Pertman
Why did you use all of this while loop and Time.now and stuff, when sleep 5*60 was the only line needed to sleep for 5 minutes? Jarmo On Mar 5, 3:15 am, wesley chen cjq@gmail.com wrote: If you want to sleep 5 mins, please try the code below: require 'watir' t=Time.now while

[wtr-general] Re: How to change a ruby file into an .exe file

2009-03-19 Thread Jarmo Pertman
main.rb It will make the main.rb into main.exe Thanks. Wesley Chen. On Sat, Feb 28, 2009 at 12:50 AM, Jarmo Pertman jarm...@gmail.com wrote: Or use rubyscript2exe, which also supports Linux and OSX. You can read more about it from here http://www.erikveen.dds.nl/rubyscript2exe

[wtr-general] Re: How to change a ruby file into an .exe file

2009-04-01 Thread Jarmo Pertman
, Mar 19, 2009 at 8:06 PM, Jarmo Pertman jarm...@gmail.com wrote: I remember that you had to use rubyscript2exe variables instead of File.dirname. Please refer to here to find out which one works for you: http://www.erikveen.dds.nl/rubyscript2exe/#3.3.0 On Mar 18, 2:57 pm, wesley chen cjq

[wtr-general] SelectList behaves differently with 1.6.2?

2009-04-02 Thread Jarmo Pertman
Hello. I've updated Watir from 1.5.6 to 1.6.2 and at least one test started failing with suspicious problems. First, I have this line: $browser.select_list(:name, blah).select myvalue This line fails, saying that value is not there. When I print html, then value is not there indeed. When I do

[wtr-general] Re: SelectList behaves differently with 1.6.2?

2009-04-03 Thread Jarmo Pertman
My question was, why my tests started to fail? Also, fire_event seems to behave differently, e.g. it will return before actual event has been finished. With 1.5.6 this seemed to work well enough - it didn't carry on before fire_event was actually finished. Is just Watir 1.6.2 made seemingly

[wtr-general] Re: SelectList behaves differently with 1.6.2?

2009-04-05 Thread Jarmo Pertman
Release notes (http://wiki.openqa.org/display/WTR/Release+Notes) from 1.5.6 to 1.6.2 doesn't seem to mention anything regarding wait method or wait logics. I also diffed methods click, click!, click_no_wait, fire_event and wait from 1.5.6 and 1.6.2 and they were exactly the same (one difference

[wtr-general] Re: Regex in the link's text

2009-04-06 Thread Jarmo Pertman
Or, since vb is already a string, then even cleaner syntax would be: ie.link(:text, Regexp.new(vb)).click Also, Netbeans for example doesn't mess syntax highlighting up with the /#{vb}/ solution. Jarmo On Mar 24, 9:31 pm, vladimir...@hotmail.com vladimir...@hotmail.com wrote: Thank you, Bret.

[wtr-general] Re: SelectList behaves differently with 1.6.2?

2009-04-07 Thread Jarmo Pertman
As I've stated already on my previous post, I already diffed wait method and only difference was one additional rescue NoMethodError. But my problem is not related with that fix, because I'm not receiving any NoMethodErrors. I still guess that the logic may be behind the fact that 1.6.2 is

[wtr-general] Re: How to know if the checkbox is checked or not?

2009-04-07 Thread Jarmo Pertman
Why are you making it to string and comparing with string representation of TrueClass? You also had only one '=', which makes your if to be always true. Correct would be of course if $ie.checkbox(:name,blah).checked? == true end On Apr 3, 4:00 pm, Darin Duphorn dduph...@redbrickhealth.com

[wtr-general] Re: Browser.url does not return proper URL immediately after a browser.goto statement

2009-04-08 Thread Jarmo Pertman
Hi. Actually, it doesn't matter if () or {} is used. You just have to use some non-alpha character - for example, let's say that you want to add elements like {one {two {three then you cannot use %w{}, but it would be wise to use %w() instead. Anyway, here are some examples: irb(main):004:0

[wtr-general] Re: How to use xml element?

2009-04-08 Thread Jarmo Pertman
You have some xml file opened in IE? Why not just download it and handle it as a regular XML, instead of trying to manipulate it with Watir? On Mar 31, 9:13 am, Angrez Singh ang...@gmail.com wrote: Thanks Vikas, but my problem is not related to reading XML in ruby.

[wtr-general] Re: Difference between fire_event(click) and element.click

2009-04-08 Thread Jarmo Pertman
As I understand, then onfocus event is require prior clicking something? So for example, if uses clicks with mouse, then onfocus event is triggered before actual click? Is this the reason, why at the moment I have to do something like this in my tests to work correctly: button.click

[wtr-general] trying to access text_field, but getting link instead?!?

2009-04-09 Thread Jarmo Pertman
Hi. I stumbled into one interesting problem, which haven't happened before. I tried to access text_field with id, and got link object instead. Here is my commands and output: $browser.text_field(:id, info).value = test unknown property or method: `value' HRESULT error code:0x80020006

[wtr-general] Re: trying to access text_field, but getting link instead?!?

2009-04-10 Thread Jarmo Pertman
On Apr 9, 8:16 pm, Chuck van der Linden sqa...@gmail.com wrote: I think you are calling the wrong method for what it looks like you are trying to do. .value  returns the current value in the text field.. to set the text field to a particular string you want .set No you don't want to use

[wtr-general] Re: How to use xml element?

2009-04-10 Thread Jarmo Pertman
with XML element in IE. refer this link:http://msdn.microsoft.com/en-us/library/ms535918(VS.85).aspx - Angrez On Wed, Apr 8, 2009 at 5:43 PM, Jarmo Pertman jarm...@gmail.com wrote: You have some xml file opened in IE? Why not just download it and handle it as a regular XML, instead of trying

[wtr-general] Re: How to change a ruby file into an .exe file

2009-04-11 Thread Jarmo Pertman
It's your Ruby script whichever you wanted to load :) On Apr 3, 4:40 pm, neeraj girdhar er.neeraj...@gmail.com wrote: Hi, what is this '/something' in your code. Regards, Neeraj --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[wtr-general] Re: How to know if the checkbox is checked or not?

2009-04-11 Thread Jarmo Pertman
Yup, you are correct, but I wanted to show it in the == context. Anyway, it was good for you to point out the correct usage, which I have been using also so that everyone else (hopefully) would use that approach too :) Jarmo On Apr 7, 7:08 pm, Bret Pettichord b...@pettichord.com wrote: Even

[wtr-general] Re: FireWatir bug/anomaly

2009-04-11 Thread Jarmo Pertman
Try to print out html for that select_list to make sure that you are really dealing with the correct select_list and there aren't any hidden ones or whatsoever. Or try just plain old .flash method to see if correct list is flashing :) Jarmo On Apr 5, 7:07 am, Chris christopher.mcma...@gmail.com

[wtr-general] Re: Posting invalid form data with Watir

2009-04-12 Thread Jarmo Pertman
You should be able to use JavaScript to make these things. For example, I have this select list on my page: select name=menu option value=0 selected0/option option value=1one/option /select Now, in Watir I could do something like this with JavaScript: script = %q {

[wtr-general] Re: Posting invalid form data with Watir

2009-04-12 Thread Jarmo Pertman
On Apr 12, 2:49 pm, Jarmo Pertman jarm...@gmail.com wrote: script = %q { Sorry, I had one extra space in here - %q {... Correct would be %q { (so, there's no space after %q) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[wtr-general] Re: trying to access text_field, but getting link instead?!?

2009-04-12 Thread Jarmo Pertman
Sorry for causing confusion in here. I was saying on my first post already that there wasn't any text_field with id info on that page so that link with id info was the only one. I was just on the wrong page with my Watir, but I was surprised that it found an link even if I were trying to find

[wtr-general] Re: trying to access text_field, but getting link instead?!

2009-04-12 Thread Jarmo Pertman
You're saying that :zippy only removes delays. For me it also doesn't fire any events (at least not onchange). I just discovered it - that's the reason why my onchange events haven't fired without implicitly calling fire_event(onchange) after changin text_field's value (I was using value =

[wtr-general] Re: os and browser version

2009-04-13 Thread Jarmo Pertman
Don't do that. Use regular expressions instead, something like this: system(rubyw -e \require 'win32ole'; @autoit=WIN32OLE.new ('AutoItX3.Control'); waitresu...@autoit.winwait '[REGEXPTITLE:Choose (f|F)ile( to Upload)?]', '', 15; sleep 1; if waitresult == 1\ -e \@autoit.ControlSetText

[wtr-general] Re: SelectList behaves differently with 1.6.2?

2009-04-14 Thread Jarmo Pertman
Okey, I've finally found the culprit of my failing tests. I don't know exactly, what has changed in Watir to make my tests to fail, but I know that it is not Watir's fault per se. I also changed subject of this topic, because original problem is not related with this seem-to-be-greater problem.

[wtr-general] Re: JavaScript events timing problems with Watir

2009-04-15 Thread Jarmo Pertman
? Just click button so many times as error_message div changes finally? Jarmo On Apr 14, 9:55 pm, Chuck van der Linden sqa...@gmail.com wrote: On Apr 14, 5:42 am, Jarmo Pertman jarm...@gmail.com wrote: Anyway, now I have completely different problem. Problem is related with fire_event. I have

[wtr-general] Re: JavaScript events timing problems with Watir

2009-04-16 Thread Jarmo Pertman
As I said, then everything works correctly when I use debugger and execute commands one by one (or even irb), so the problem is not related with invoking wrong event. Also, I have checked that onclick event is attached to it. On Apr 15, 11:18 pm, Chuck van der Linden sqa...@gmail.com wrote: Are

[wtr-general] Re: Watir/Rspec

2009-04-16 Thread Jarmo Pertman
First, you do not want to require test/unit and spec together. Just require spec. Second, use real assertions not if statements. So, this example would work, run it by spec T.rb require 'watir/ie' require 'spec' describe Ticket Processing do before :all do @browser =

[wtr-general] Re: Name of the calling function

2009-04-20 Thread Jarmo Pertman
You could use Kernel#caller to extract this information http://www.ruby-doc.org/core/classes/Kernel.html#M005955 Jarmo On Apr 17, 4:55 pm, Vikas Tulashyam vtulash...@gmail.com wrote: Hi Friends, I want to get the name of the calling function in our program . e.g. -- class A def

[wtr-general] Re: How do I get the page status (200, 404, 500, etc)

2009-04-23 Thread Jarmo Pertman
I also wondered why this regular expression script was in Watir's source, since it is actually really easy to get status with Net::HTTP. Anyway, here are 2 examples I just did which could be used. First one returns response status code and response class. It will throw exception if web server

[wtr-general] Re: How do I get the page status (200, 404, 500, etc)

2009-04-23 Thread Jarmo Pertman
Ok, I played a little more so it would also work with https. Just needed to add few extra lines to existing script: def page_status url url = URI.parse(url) http = Net::HTTP.new(url.host, url.port) if url.scheme.downcase == https http.verify_mode = OpenSSL::SSL::VERIFY_NONE

[wtr-general] Re: How do I get the page status (200, 404, 500, etc)

2009-04-23 Thread Jarmo Pertman
Sorry, you also need to replace require 'net/http' with require 'net/ https' Jarmo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to

[wtr-general] Re: trying to access text_field, but getting link instead?!

2009-04-24 Thread Jarmo Pertman
Okay, back to the original problem. I code similar to this: if $browser.text_field(:id, blah).exists? do something with text field elsif $browser.select_list(:id, blah).exists? do something with select list else raise blah not found end this code is in a method and it will be called

[wtr-general] Re: How do I get the page status (200, 404, 500, etc)

2009-04-24 Thread Jarmo Pertman
need to get all the cookies etc from the browser into net/http. And you wont get any javascript or ajax stuff happening. Paul On Thu, Apr 23, 2009 at 4:50 AM, Jarmo Pertman jarm...@gmail.com wrote: Sorry, you also need to replace require 'net/http' with require 'net/ https' Jarmo

[wtr-general] Re: How to use the Watir::SelectList methods?

2009-04-28 Thread Jarmo Pertman
For some reason options method is not there anymore and docs aren't updated. There is method getAllContents, but I didn't like this camelCase method name, so I patched it: class Watir::SelectList alias :options :getAllContents end On Apr 28, 12:21 pm, Wesley Chen cjq@gmail.com wrote:

[wtr-general] Re: exists? returns the number 8 instead of true

2009-05-04 Thread Jarmo Pertman
This happens due to the fact, that Watir::IE#exists? does just @ie.name =~ /Internet Explorer/, which returns nil or a number. But, since in Ruby everything except nil or false will be treated as true, then you can still use it as regularly like this: if $browser.exists? # do this else # do

[wtr-general] Re: Help needed in automation using Watir

2009-05-15 Thread Jarmo Pertman
On May 15, 7:18 am, Lokesh Agrawal lokesh.agra...@gmail.com wrote: I found one framework with this approach: JAF (http://90kts.com/blog/ 2008/just-another-framework-for-developing-watir-test-cases/). But I have not used it so doesn't know if this is helpful or not. (As this framework is

[wtr-general] Re: example problem

2009-06-02 Thread Jarmo Pertman
If you have gems, then add require 'rubygems' before require 'watir' or add environment variable RUBYOPT=-rubygems Jarmo On May 31, 8:55 am, James j.s.west...@gmail.com wrote: ok completely new to the world of ruby as well as programming       The final goal is too scrape an ajax site... if I

[wtr-general] Re: WatirCraft LLC is closing

2009-06-08 Thread Jarmo Pertman
On Jun 8, 3:52 am, marekj marekj@gmail.com wrote: Bummer, bummeroon.. These last 12 months have not been easy in American economy. Only for American economy? I would say that the whole world is in this economy crisis :) But I would also like to say big thanks to Bret and everyone who has

[wtr-general] Re: Capturing Java Script Errors

2009-10-15 Thread Jarmo Pertman
share the code for the AutoIt if its not an issue. I would be interested in something similar for our work. On Fri, Oct 9, 2009 at 3:46 PM, Jarmo Pertman jarm...@gmail.com wrote: Hello. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[wtr-general] Re: Capturing Java Script Errors

2009-10-16 Thread Jarmo Pertman
We are using RSpec to run our tests (http://rspec.info) and I've created my own HTMLFormatter class which extends their Spec::Runner::Formatter::HtmlFormatte and then using #extra_failure_content method, which will be invoked if some test fails by RSpec itself. So, if test fails, I'm also

[wtr-general] Re: Hudson, was Re: Dwatir - Can this help running watir tests on remote machines?

2009-10-16 Thread Jarmo Pertman
I've also had some thoughts about running tests in parallel and I'm thinking currently that it should be relatively easy to implement your own system with DRb (Distributed Ruby - http://www.ruby-doc.org/stdlib/libdoc/drb/rdoc/index.html). Maybe I don't see some issues which might come with it,

[wtr-general] Re: Autocomplete with send Keys does not work when not logged in

2009-10-20 Thread Jarmo Pertman
Hi. You are correct that some of the AutoIt functions won't work when you are logged out (locked out). You could use some virtual machine to run the tests (which has ruby installed with Watir and Autoit and so on), which won't turn on screensaver or won't lock out. You could use VMWare or

[wtr-general] Re: Not Able to Use Rspec framework

2009-10-26 Thread Jarmo Pertman
require 'rubygems' require 'watir' require 'spec' describe Blah do before :all do @b = Watir::Browser.new end it does something do @b.goto http://google.com; end describe some other thing do @b.goto http://watir.com; end end Jarmo On Oct 23, 4:45 pm,

[wtr-general] Re: watir or selenium

2009-10-28 Thread Jarmo Pertman
Hello, Raveendran. I got confused by the last sentence in your blog You can also express Selenium tests in a programming language, taking advantage of language- specific drivers that communicate in Selenese to the browser bot.. What did you mean by that exactly? I mean, why cannot you express

[wtr-general] Re: Watir, AutoIT, Window Title and Regular Expression

2009-10-29 Thread Jarmo Pertman
Why on earth has it done like that?!? Any good reasons why not to include AutoIT with full functionality? Anyone? Seems silly to do that silently and i see it just as a one more source of possible nasty problems and debugging. Jarmo On Oct 29, 11:10 am, Željko Filipin

[wtr-general] Re: Object Click and Timeout::timeout

2009-11-02 Thread Jarmo Pertman
Use #click_no_wait instead. Jarmo On Nov 2, 11:29 am, Pallavi Sharma write2pall...@gmail.com wrote: Hi I am trying a scenario, where the object click results in a pop up window so it hangs until the popup is handled. so i am trying something like this: begin Timeout::timeout(30) {  

[wtr-general] Re: Where to download gem watir 1.5.1.1100 ?

2009-11-26 Thread Jarmo Pertman
By the way, all the installed gem files in the past are stored also in Ruby directory. For example, i have all of these in C:\ruby\lib\ruby \gems\1.8\cache On Nov 25, 1:36 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Nov 25, 2009 at 12:32 PM, 唐觊隽 r7raul1...@gmail.com wrote:

[wtr-general] Re: Trouble installing Watir on a Closed Network

2009-11-29 Thread Jarmo Pertman
Hello. Just download all your needed gem files from http://rubyforge.vm.bytemark.co.uk/gems/ for example and then install them from the command line with command gem install gem-file-name. Jarmo On Nov 27, 1:50 am, bender25 zuzi...@yahoo.com wrote: Hi all, I am very new to Ruby and Watir

[wtr-general] Re: How to wait until an element is visible on a page

2009-12-01 Thread Jarmo Pertman
Why is it invalid? How is the div made invisible? If you look at watir/ contrib/visible.rb, then it checks against css style visibility: hidden or display: none. Is one of these in use? Jarmo On Nov 30, 10:39 pm, QAguy qablogm...@gmail.com wrote: I have this piece of code on a page I am trying

[wtr-general] Re: Wătir

2009-12-25 Thread Jarmo Pertman
Hehe. Thank you for this great explanation! Jarmo On Dec 24, 1:43 am, John Fitisoff jfitis...@yahoo.com wrote: I think the rule is that if you create and maintain a library you get to call it whatever you like. :-) -- You received this message because you are subscribed to the Google Groups

[wtr-general] :after? and :before? methods not supported for all elements?

2010-01-20 Thread Jarmo Pertman
Hello. I've tried something like this: puts b.span(:after? = b.text_field(:id = blah)).html and it works, but if I try it with text_field, like this: puts b.text_field(:after? = b.text_field(:id = blah)).html then I get this stacktrace: wrong number of arguments (0 for 1)

[wtr-general] Re: :after? and :before? methods not supported for all elements?

2010-01-20 Thread Jarmo Pertman
Sorry, stacktrace got truncated. Here is full one: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/locator.rb:127:in `before?': wrong number of arguments (0 for 1) (ArgumentError) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ locator.rb:127:in `send' from

[wtr-general] Re: :after? and :before? methods not supported for all elements?

2010-01-21 Thread Jarmo Pertman
Forgot to mention that it doesn't matter if you use comma or a hash in this case - result is the same. Jarmo -- 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,

[wtr-general] Re: :after? and :before? methods not supported for all elements?

2010-01-22 Thread Jarmo Pertman
On Jan 21, 2:38 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Jan 21, 2010 at 9:48 AM, Jarmo Pertman jarm...@gmail.com wrote: then there is an example of using :after? (although not :before?, though this is also available) I think :before? is deprecated because it did

[wtr-general] Re: :after? and :before? methods not supported for all elements?

2010-01-22 Thread Jarmo Pertman
I just had a case where I wanted to check needed fields, for example there's a form something like this: form action='blah' input name='field1' input name='field2' input type='submit' /form now if i press submit, then the form will have an error message something like all necessary fields

[wtr-general] Re: A way to identify the events to be fired on an object

2010-02-04 Thread Jarmo Pertman
You cannot actually know easily all the events associated with the object, because events are bubbled up in the DOM if no direct event is attached to the element. You can read about the bubbling from here for example

[wtr-general] Re: click_no_wait fails when multiple tabs are open in IE7

2010-02-08 Thread Jarmo Pertman
Hello. unique_number is an method for Watir::Element and it's declaration is (for Watir 1.6.2) at element.rb on line 88 - in short, it is just a wrapper for ole_object.invoke('uniqueNumber'). For debugging the reason of the failing of click_no_wait, I'd suggest you to modify method called

[wtr-general] Re: Watir, Rspec, and radio buttons.

2010-02-11 Thread Jarmo Pertman
Another cool thing with RSpec is the has methods. So, for example: class Person def has_brain? true end end person = Person.new person.should have_brain Neat, eh? That's the beauty of RSpec (and other similar DSL-s) and that's why i have been using RSpec instead of Test::Unit for a

[wtr-general] My blog about Watir and RSpec

2010-02-11 Thread Jarmo Pertman
Hello. I've been blogging already some time now about Watir and RSpec and will continue doing it. I'm not creating new posts often, but I have somekind of to-do list on my PC for future topics. I've been creating some posts which are little bit tied to each other - e.g. i started doing something

[wtr-general] Re: My blog about Watir and RSpec

2010-02-14 Thread Jarmo Pertman
! It should definitely be included on the Watir.com list of blogs. Alister (and maybe Zeljko) can add it. I'm looking forward to reading more! -Tiffany On Feb 11, 2:34 pm, Jarmo Pertman jarm...@gmail.com wrote: Hello. I've been blogging already some time now about Watir and RSpec

[wtr-general] Re: My blog about Watir and RSpec

2010-02-16 Thread Jarmo Pertman
I asked Tiffany, because she said about looking forward to reading more, thus I was just interested how will she manage to do that technically. Just like a market-survey :) Jarmo On Feb 15, 7:00 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Sun, Feb 14, 2010 at 5:29 PM, Jarmo

[wtr-general] Re: My blog about Watir and RSpec

2010-02-17 Thread Jarmo Pertman
, 2010 at 9:34 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Feb 11, 2010 at 10:34 PM, Jarmo Pertman jarm...@gmail.com wrote: i'm waiting for any feedback I am reading your posts, and my first feedback would be to slightly increase font size on your blog. :) Željko

[wtr-general] Re: Question About Watir

2010-02-18 Thread Jarmo Pertman
Also, if there is some part unique, then you could use multiple parameters as well: browser.text_field(:name = /field_name/, :class = 'css- class', :index = 3).set('my text') which would find third text_field with class='css-class' with name='somethingfield_namesomething' Jarmo On Feb 18, 1:41 

[wtr-general] Re: Elements supported by Watir

2010-02-18 Thread Jarmo Pertman
You could even write it without any custom methods (is_element_subclass?) like this: require 'watir/ie' ObjectSpace.each_object(Class) {|c| puts c if c.ancestors.include? (Watir::Element)} Although I don't also understand what's the use of the classnames to regular users... Jarmo On Feb 17,

[wtr-general] Re: Switching from Test::Unit to RSpec - tips/gotchas? Short code review.

2010-02-25 Thread Jarmo Pertman
First of all - RSpec is a good choice :) I wouldn't use so many nested describe blocks - it makes it hard to understand, what before and after blocks are run at which time and so on. Just keep one describe block or create different describe blocks. Also, I would lose shared_examples for this

[wtr-general] Re: Switching from Test::Unit to RSpec - tips/gotchas? Short code review.

2010-02-25 Thread Jarmo Pertman
I'm answering into the group directly - maybe someone else finds this also useful. Think of the helpers as a collection of methods which will be used throughout the tests. You could do many modules. Some modules would be specific to your current application under test and some others would be

[wtr-general] Re: Watir issue with AutoIt on Vista 64 bit

2010-04-02 Thread Jarmo Pertman
I know what was the problem. At least when i installed autoit manually on my 64bit windows, then it registered AutoItX3_x64.dll and i guess that Watir wanted to use 32bit version instead, thus failed. I ended up also registering 32bit dll and got it working. Anyway, just so you know. Jarmo

[wtr-general] Re: Basic Authentication using FireWatir on Ubuntu Linux

2010-04-02 Thread Jarmo Pertman
there is something called WinClicker for firewatir also, which seems to be for linux only due to this statement: if /linux/i.match(RUBY_PLATFORM) So i guess that the Win part there means just a regular window :) Look into it's methods and maybe it helps. Jarmo On Apr 1, 10:57 pm, Eric

[wtr-general] Re: [ANN] WatiRspec 0.1.0

2010-04-05 Thread Jarmo Pertman
(haven't had the time to update it yet with newest ideas) from my blog too: http://www.itreallymatters.net Jarmo Pertman -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http

[wtr-general] Re: [ANN] WatiRspec 0.1.0

2010-04-06 Thread Jarmo Pertman
simple. Interested to hear more about your point of view and how you see it, or anyone else for that matter. Let me know. :) Cheers, Charley Baker Lead Developer, Watir,http://watir.com QA Architect, Gap Inc Direct On Mon, Apr 5, 2010 at 7:26 AM, Jarmo Pertman jarm...@gmail.com wrote: Hi

[wtr-general] Re: WatiRspec 0.1.0

2010-04-06 Thread Jarmo Pertman
Why is that subject changing all the time? :P Anyway, i have to correct, sorry about my English: What did you mean with this probably best to avoid that name for now exactly? Jarmo On Apr 6, 9:32 pm, Jarmo Pertman jarm...@gmail.com wrote: Well, as i understood, then Taza just offers extra

[wtr-general] Re: [ANN] WatiRspec 0.1.0

2010-04-07 Thread Jarmo Pertman
, but easily could be. So while there's not a name clash right now, the possibility exists that there may be in the future. It makes sense to make Jari's current work into a gem. Thoughts? -c On Tue, Apr 6, 2010 at 12:32 PM, Jarmo Pertman jarm...@gmail.com wrote: Well, as i understood, then Taza

[wtr-general] Re: [ANN] WatiRspec 0.1.0

2010-04-07 Thread Jarmo Pertman
its name in the future to avoid conflict with yours does not seem reasonable. But, ultimately it is your own decision to make I think. On Wed, Apr 7, 2010 at 11:23, Jarmo Pertman jarm...@gmail.com wrote: Actually i didn't know about WatirCraft either. I know that i have heard about

[wtr-general] Re: a method that will always executes.

2010-04-09 Thread Jarmo Pertman
Yup, you have a good memory. Anyway, it is a Kernel method and it's documentation is here: http://ruby-doc.org/core/classes/Kernel.html#M005932 On Apr 9, 1:12 am, Paul Rogers paul.rog...@shaw.ca wrote: at_exit do    puts Youve ended! end might be what you need ( check the syntax, long time

[wtr-general] Re: Grrr! click_no_wait does not work :-(

2010-04-13 Thread Jarmo Pertman
I've written in my blog about a method how to debug problems related to click_no_wait at http://www.itreallymatters.net/post/378669758/debugging-watirs-click-no-wait-method-problems It might not be the same problem as in the mentioned bug, but just make sure :) Jarmo On Apr 13, 8:57 am,

[wtr-general] Re: A stupid question ... how do I apply patches to Watir? :-(

2010-04-14 Thread Jarmo Pertman
Did you debug the problem as i suggested in this other thread? http://groups.google.com/group/watir-general/browse_thread/thread/222b2bf7df33644 Jarmo On Apr 14, 3:13 am, Rats crapats...@yahoo.com.au wrote: On Apr 14, 9:05 am, Rats crapats...@yahoo.com.au wrote: As per my previous posts I

[wtr-general] Re: file download

2010-04-14 Thread Jarmo Pertman
Only workaround i've used so far is that i've used virtual machine so you can lock your main machine. No other solutions so far unfortunately. Jarmo On Apr 13, 5:50 pm, arihan sinha arihan.si...@googlemail.com wrote: Any solution to this problem. any work around etc. Regards Arihan On

[wtr-general] Re: Handling popups without using click_no_wait

2010-05-06 Thread Jarmo Pertman
But why cannot you get click_no_wait working? I've made a little blog post about debugging the problems with click_no_wait. Maybe you can give it a try to see some specific reasons. http://www.itreallymatters.net/post/378669758/debugging-watirs-click-no-wait-method-problems Also, there is a

[wtr-general] Re: [Wtr-development] Vapir

2010-05-08 Thread Jarmo Pertman
Maybe this is a completely different problem? Maybe we should ask, what is the main reasons why classes get extended or monkey-patched. Maybe there even isn't so many users who have been doing that or do we know that for certain that there really is? I, myself, have been doing these only if

[wtr-general] Re: Watir gem installation on Windows 7

2010-05-19 Thread Jarmo Pertman
There shouldn't be anything special when it comes to installing Watir on Windows 7. At least i didn't do anything. Could you please specify *what* and *how* isn't exactly working? Jarmo On May 19, 7:37 am, Betsy joybe...@gmail.com wrote: Hi George, That is encouraging... At least it works for

[wtr-general] Re: click_no_wait, why so inconsistent?

2010-05-22 Thread Jarmo Pertman
Hi. Try to press browser back and forward button while your test hangs to see if there's anything happening. If there is then i might just have an idea, what causes this. Temporary solution would be to just issue browser.back and browser.forward before trying to save some file again. Let us know

[wtr-general] Re: [ANN] Win32::Screenshot 0.0.4

2010-05-28 Thread Jarmo Pertman
I still prefer solutions in Ruby, that's why i decided to clean it up and make it work. Jarmo On May 28, 12:00 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, May 27, 2010 at 10:23 PM, Jarmo Pertman jarm...@gmail.com wrote: I'm thinking that here are probably some people who

[wtr-general] Re: AutoItX3 failing on virtual machine when remote desktop window minimized/closed

2010-06-04 Thread Jarmo Pertman
I'm not sure if we're talking about the same thing in here, but for example VirtualBox works fine if physical host is locked out. It does screenshots and everything else. And even on XP with no special configuration. Jarmo On Jun 3, 11:13 am, Chuck van der Linden sqa...@gmail.com wrote: Most

[wtr-general] Re: Element #visible?

2010-06-17 Thread Jarmo Pertman
On Jun 17, 12:34 am, Charley Baker charley.ba...@gmail.com wrote: Otherwise, I'll do this in the next day or two, as I'm starting to weed through pull requests and issues. Cool! There are also some pull requests from me :) Side question for anyone who uses visible? is this going to cause

[wtr-general] Re: Clicking a div with last index

2010-06-28 Thread Jarmo Pertman
Or, you could do it like this which is not so good anyway: ie.divs.find_all {|div| div.text == div}.last.click Better add some id, name, class or whatever attributes to the divs to make it more robust and more readable. Jarmo On Jun 28, 11:31 am, Željko Filipin zeljko.fili...@wa-research.ch

[wtr-general] Re: WatiR Recorder++

2010-06-28 Thread Jarmo Pertman
I've just got my bachelor's degree from the school with the thesis of Web Applications’ User Interface Based Testing Automation. Unfortunately it is written in Estonian, so no point of giving the link in here i guess :P Anyway, also capture/replay was a small topic in the thesis, that's why I

[wtr-general] Re: Clicking a div with last index

2010-06-29 Thread Jarmo Pertman
Then use the solution provided by me :) Jarmo On Jun 28, 5:55 pm, Ajitesh Srinetra ajitesh.srine...@gmail.com wrote: Hi Joe We have a complex GUI with the ext Frame work This is having a lot of divs.Now coming to the solution iLastDivIndex =  browser.divs.length with fetch the index of the

[wtr-general] Re: click_no_wait, why so inconsistent?

2010-06-30 Thread Jarmo Pertman
enlighten me, but browser.back, browser.forward before calling the click_no_wait method works like a champ so far.  It would always stop at the second link, but my script is up to the 8th download now and still looking good.  Thanks for the help, really. On May 22, 5:39 am, Jarmo Pertman jarm

[wtr-general] Re: Iterate through radio buttons

2010-07-07 Thread Jarmo Pertman
On Jul 6, 12:21 am, Chuck van der Linden sqa...@gmail.com wrote: See commented line, then below    Functionally you are saying if there is a radio button on the page with an ID value of then put yes Actually this is not completely true because if you create an object with Watir, then

[wtr-general] Re: How I can do double click on a Cell

2010-07-29 Thread Jarmo Pertman
) This kind of approach gives you more robust tests also - if table layout changes (more rows or columns are added) then the test will still work and be readable. The absolute (!) XPath provided below is just as fragile as it could get. Hope these ideas make sense. Jarmo Pertman - IT does really

[wtr-general] Re: How i can delete all element from a list (ul)

2010-07-29 Thread Jarmo Pertman
What do you mean by deleting? Why you can't? What happens when you try? How have you tried? Please try to give more information because otherwise it is impossible to help. Jarmo Pertman - IT does really matter - http://www.itreallymatters.net On Jul 28, 9:57 pm, carmen3lia eliaol

[wtr-general] Re: How I can catch the JS errors?

2010-07-30 Thread Jarmo Pertman
Yes, it is working so-and-so, because sometimes IE shows just a status message of Done with an yellow exclamation mark like it is doing with JavaScript errors. It means that during the loading of the page the Error message is shown but when loading has finished then IE sets it's status to normal

[wtr-general] Re: Recent Stack Overflow Questions Tagged Watir

2010-07-30 Thread Jarmo Pertman
Page not found... On Jul 29, 11:55 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: Back to the original topic of this thread. :) http://stackoverflow.com/questions/3359710/how-to-timeout-a-page-load... Željko -- Before posting, please read http://watir.com/support. In short: search

[wtr-general] Re: Watir on Windows, how is it done anymore?

2010-08-07 Thread Jarmo Pertman
As i understood from the previous discussions then Ethan was unable to provide the changes made in Vapir as a small chunks so they could be merged into Watir's main branch in small steps and have some overview of the changes made. Ethan, can you shed some light on this one? Jarmo On Aug 6, 2:05 

[wtr-general] Re: Watir on Windows, how is it done anymore?

2010-08-13 Thread Jarmo Pertman
What about giving access to more people to the repository so it's possible to make changes there without waiting for months? And what about not trying to support everything and everyone by not wanting to make any core changes to the code? That's what i don't understand. Rails and RSpec guys are

[wtr-general] Re: in `gem_original_require': no such file to load -- win32screenshot (MissingSourceFile)

2010-08-26 Thread Jarmo Pertman
Despite of the fact that this is not a Watir's question obviously and you haven't shown us your source, you need to require 'win32/ screenshot' instead of 'win32screenshot'. Jarmo Pertman - IT does really matter - http://www.itreallymatters.net On Aug 26, 11:56 am, Željko Filipin

[wtr-general] Re: in `gem_original_require': no such file to load -- win32screenshot (MissingSourceFile)

2010-09-02 Thread Jarmo Pertman
. now i installed the gem with old version and it is working fine now. On Fri, Aug 27, 2010 at 1:33 AM, Jarmo Pertman jarm...@gmail.com wrote: Despite of the fact that this is not a Watir's question obviously and you haven't shown us your source, you need to require 'win32/ screenshot

  1   2   3   4   >