Re: [Wtr-general] Windows Vista / IE 7 RPC Server is Unavailable

2006-12-07 Thread Udo Fr#246;hling
Do you have a teardown defined in which your browser is closed? In my case it was called after the first test and in the second test the browser window was closed. I renamed the teardown to test_99_teardown and it was executed at the end of my test case

[Wtr-general] pop up box

2006-12-07 Thread Matt Makins
Hi, I have a pop up box that appears on a web page, just a IE window with a 'OK' button. How do I access the pop up box and click the 'OK' button. I have tried WinClicker. Thanks, Matt ___ Wtr-general mailing list

[Wtr-general] How does one access a web page element by its css class?

2006-12-07 Thread Nathan
Hey everybody! I just came across something that I had never before thought to be a problem. The solution seems obvious, but it isn't and so here I am, looking for answers. The problem is that I am trying to access an element by its css class. For example: lt;img class=btn_viewResultsgt;

Re: [Wtr-general] How does one access a web page element by its css class?

2006-12-07 Thread John Lolis
While I can't answer the exact question, I can explain how I would solve it. Find the 'nearest' containing element that you can use (a table, div, span - whatever). Then use that element AND the index of the image. This helps you narrow it down. So say you had Table :id 'table_one' row row

Re: [Wtr-general] How does one access a web page element by its css class?

2006-12-07 Thread Nathan
Thank you Jlolis. That does help me. I was trying to do that, because I'd seen other people do it. Here's the problem that I've come up against with doing that. The containing web element is a div, and when I do this: ie.div(:id, viewResultsButton).images I get an error: NoMethodError:

[Wtr-general] Warnings: already initialized constant when executing watir scripts

2006-12-07 Thread Avinash
I am running the following versions: ruby 1.8.5 (2006-08-25) [i386-mswin32] watir 1.5.1.1081 I was running an older version of ruby but uninstalled it before installing the current version, using the windows one-click installer. When I execute watir scripts, I get the following blurb of

Re: [Wtr-general] Warnings: already initialized constant when executing watir scripts

2006-12-07 Thread John Lolis
shot in the dark here, did you by chance require 'Watir' twice? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5662messageID=15816#15816 ___ Wtr-general mailing

Re: [Wtr-general] How does one access a web page element by its css class?

2006-12-07 Thread Ethan Jewett
Nathan, I believe that in 1.5.1127, you can also loop through images and check the class attribute. @ie = Watir::IE.new @ie.goto(http://somepage.com) @ie.images.each do |image| if image.attribute_value(class) == btn_viewResults # Image found else # This image isn't the one

Re: [Wtr-general] How does one access a web page element by its css class?

2006-12-07 Thread Ethan Jewett
Actually, of course it does regular expression matches, they're just regular Ruby regular expressions because there's no need to do a regular expression match in the .attribute_value method call. On 12/7/06, Ethan Jewett [EMAIL PROTECTED] wrote: Nathan, I believe that in 1.5.1127, you can also

Re: [Wtr-general] Warnings: already initialized constant when executing watir scripts

2006-12-07 Thread Avinash
No, I have these lines on top of my script: require 'watir' include Watir as described here: http://wtr.rubyforge.org/example_testcase.html I am starting to get my hands dirty with Watir, hence I might be doing something silly here...

Re: [Wtr-general] Warnings: already initialized constant when executing watir scripts

2006-12-07 Thread John Lolis
just for fun i opened up the irb and did the following irb: require 'Watir' and that happend. I wouldn't worry about it :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5662messageID=15830#15830

Re: [Wtr-general] Warnings: already initialized constant when executing watir scripts

2006-12-07 Thread Charley Baker
Shouldn't happen if you type require 'watir' Note the casing. require should load files once, if, however, you change the casing then you will load the same file multiple times. -Charley On 12/7/06, John Lolis [EMAIL PROTECTED] wrote: just for fun i opened up the irb and did the following

Re: [Wtr-general] Warnings: already initialized constant when executing watir scripts

2006-12-07 Thread Avinash
Thank you. That did it. Fixed the casing (require 'watir') and all is well. So why does the casing matter? While we are on this topic, what is the difference between include and require? -- Avinash - Posted via Jive Forums