Thanks for the answer Lonny, and sorry for that untidy HTML! I’ll download TidyUI…

 

I’m trying to click the image with this:

 

$browser_popup.frame(:name,"responseFrame").div(:id, "DIVImageFile_2").image(:id, "img2").click

 

And the output shows:

 

c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:856:in `getImage': undefined local variable or method `document' for #<Watir::Div:0x3333558> (NameError)

            from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2690:in `initialize'

            from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:608:in `new'

            from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:608:in `image'

            from subir_fotos:27

 

 

Or directly with this sentence…

$browser_popup.image(:id,"img2").click

 

That sentence doesn’t throw any error, but it doesn’t click the image as the popup that should appear doesn’t….

 

Any help would be really appreciated..

Thanks in Advance!

 

Rodrigo Julian Martin

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lonny Eachus
Sent: Lunes, 22 de Mayo de 2006 08:11 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] [question] Accesing images?

 


We can see a lot easier what is going on if you indent the HTML. Try using TidyUI or some such, freely available for download.

Anyway, now that I have tidied the HTML, I can see that each image has an associated ID attribute. It would help if you told us HOW you were trying to click them. Are you using the id?

Example:

    @my_ie.image(:id, 'img2').click



Lonny Eachus
==============



Subject:

Re: [Wtr-general] [question] Accesing images?

From:

"Rodrigo Julian Martin" <[EMAIL PROTECTED]>

Date:

Mon, 22 May 2006 16:13:54 -0300

To:

<wtr-general@rubyforge.org>

 

To:

<wtr-general@rubyforge.org>

 

Hello!

 

I’m having troubles trying to click some images on a modal web dialog.

They seem to be under div tags, but I can’t click them…

 

I’ve tried with divs, images and frame sentences but nothing works…

 

Here is the html code for that section (I’ve discarded the java functions on the beginning of the html file)

 

<snip>

 

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to