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

2006-05-26 Thread Rodrigo Julian Martin








Hi Brett, thanks for the info 

I will try with Watir 1.5.. one question,
all the scripts Ive wrote with 1.41 will run in 1.5?



Another question I realized that
what I really need to click is not an image, but this:



div align=center
style=margin-bottom:10px;a
href="" id=quitar6
style=visibility:hiddenQuitar/a/div/tdtd
width=20/td

div id=DIVImageFile_1
name=DIVImageFile_1 style=position: absolute;filter:
alpha(opacity=0); top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen1
id=frmImagen1 action=""
method=post encType=multipart/form-data target=responseFrame

div style=filter:
alpha(opacity=0); width: 83px; height: 86px;

input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile1 name=as_image_file value=
>

input type=hidden
id=FILEProductImageTmp_1 name=FILEProductImageTmp_1
value=

INPUT TYPE=hidden
NAME=as_site_id VALUE=MLA

!--INPUT TYPE=hidden
NAME=as_vsite_id VALUE=MLA--

INPUT TYPE=hidden
NAME=as_item_id VALUE=21609120

INPUT TYPE=hidden
NAME=as_image_path VALUE=052006/

/div



Am I able to access the input type file
with id newFile1 in order to click it with a click_no_wait? (because
this triggers a Modal Popup)





Thanks in Advance! 





Rodrigo Julian Martin























From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Martes, 23 de Mayo de 2006
07:23 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
[question] Accesing images?





On 5/23/06, Rodrigo Julian Martin
[EMAIL PROTECTED]
wrote:











Hi Bret, sorry for the lack of info.. I'm using 1.4.1











Just as a point of information, we did not support *modal* web dialogs
in 1.4.1. So i initially thought you must be using a more current version. It
sounds like you are actually using a *popup* web dialog. The terms for these
things are confusing, but a modal dialog is a dialog that blocks access to the
main page when it is active. (all modals are popups, but some popups are
non-modal). 

The error message you are reporting clearly represents a bug in Watir. Object
nesting (e.g. accessing an image in a div) was also new back then, and has been
much improved since. I suspect that is the reason for the error. 

I suggest that you try this out with a 1.5 build.

Bret










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

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

2006-05-23 Thread Rodrigo Julian Martin








Thanks for the answer Lonny, and sorry for
that untidy HTML! Ill download TidyUI



Im 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:0x558 (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 doesnt throw any
error, but it doesnt click the image as the popup that should appear
doesnt.



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! 



Im having troubles trying to click some images
on a modal web dialog.

They seem to be under div tags, but I cant
click them



Ive tried with divs, images and frame
sentences but nothing works 



Here is the html code for that section (Ive
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

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

2006-05-23 Thread Lonny Eachus





Bret and David Schmidt are currently working on accessing popups with
frames. As far as I know, not everything is working at this time. This
should improve as their code gets debugged and included in a future
release. I have seen the issues David has had to wade through to access
elements in frames on some popups, and it is not a simple thing at all.

Lonny Eachus
==



  

  

Subject:

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

From: 
"Rodrigo Julian Martin" [EMAIL PROTECTED]
  
  

Date: 
Tue, 23 May 2006 10:36:27 -0300
  
  

To: 
wtr-general@rubyforge.org
  

  
  

  

To: 
wtr-general@rubyforge.org
  

  
  
  
  


  
  
  
  Thanks for
the answer Lonny, and sorry for
that untidy HTML! Ill download TidyUI
  
  Im 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:0x558 (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 doesnt throw any
error, but it doesnt click the image as the popup that should appear
doesnt.
  
  Any help
would be really appreciated.. 
  Thanks in
Advance!
  
  Rodrigo
Julian Martin
  
  



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

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

2006-05-23 Thread David Schmidt
Rodrigo,

Examining the HTML I see that the image with id of img2 isn't even in 
the div with id DIVImageFile_2. In addition, the img2 image doesn't 
have any events associated with it, so clicking that image won't do 
anything.

I think the link you wish to follow is the link following img2:

a href=javascript:quitar(2) id=quitar2 
style=visibility:hiddenQuitar/a

Try:

$browser_popup.frame('responseFrame').link(:id, 'quitar2').click

to click the link following the img2 image.

David Schmidt
[EMAIL PROTECTED]

Rodrigo Julian Martin wrote:

 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:0x558 
 (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



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


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

2006-05-23 Thread Bret Pettichord
It would help to know what version of Watir you are using.Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

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

2006-05-23 Thread Bret Pettichord
On 5/23/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:















Hi Bret, sorry for the lack of info.. I'm
using 1.4.1Just as a point of information, we did not support *modal* web dialogs in 1.4.1. So i initially thought you must be using a more current version. It sounds like you are actually using a *popup* web dialog. The terms for these things are confusing, but a modal dialog is a dialog that blocks access to the main page when it is active. (all modals are popups, but some popups are non-modal).
The error message you are reporting clearly represents a bug in Watir. Object nesting (e.g. accessing an image in a div) was also new back then, and has been much improved since. I suspect that is the reason for the error.
I suggest that you try this out with a 1.5 build.Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] [question] Accesing Images Snapshot

2006-05-22 Thread Rodrigo Julian Martin








And here is the snapshot of that 6 Images



Thanks!





Rodrigo Julian Martin






attachment: image_buttons.jpg
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] [question] Accesing Images..

2006-05-22 Thread Rodrigo Julian Martin








Oh, sorry.. The snapshots are supposed to go with an earlier
post Ive sent. But that post is still waiting moderation, because its
a little bigger than 40K. 



Sorry Again



Rodrigo Julian Martin








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

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

2006-05-22 Thread Rodrigo Julian Martin








Hello! 



Im having troubles trying to click some images on a
modal web dialog.

They seem to be under div tags, but I cant click
them



Ive tried with divs, images and frame sentences but
nothing works 



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



[code]



table width=550 border=0
cellpadding=0 cellspacing=0

trtdtable border=0
cellpadding=0 cellspacing=0trtd
style=font-weight:bold1br

img src="" width=85
height=85 id=img1 border=1
style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a
href="" id=quitar1
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold2br

img src="" width=85
height=85 id=img2 border=1
style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a
href="" id=quitar2 style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold3br

img src="" width=85
height=85 id=img3 border=1
style=border-collapse:collapse;border-color:#99br

div align=center style=margin-bottom:10px;a
href="" id=quitar3
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold4br

img src="" width=85
height=85 id=img4 border=1 style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a
href="" id=quitar4
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold5br

img src="" width=85
height=85 id=img5 border=1
style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a
href="" id=quitar5
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold6br

img src="" width=85
height=85 id=img6 border=1
style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a href=""
id=quitar6
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tddiv id=DIVImageFile_1
name=DIVImageFile_1 style=position: absolute;filter: alpha(opacity=0);
top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen1
id=frmImagen1 action=""
method=post encType=multipart/form-data
target=responseFrame

div style=filter: alpha(opacity=0); width: 83px;
height: 86px;

 input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile1 name=as_image_file
value= >

 input type=hidden
id=FILEProductImageTmp_1 name=FILEProductImageTmp_1
value=


INPUT TYPE=hidden NAME=as_site_id
VALUE=MLA


!--INPUT TYPE=hidden NAME=as_vsite_id
VALUE=MLA--


INPUT TYPE=hidden NAME=as_item_id
VALUE=21607561


INPUT TYPE=hidden NAME=as_image_path
VALUE=052006/

/div

nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

input type=reset value=
q  
style=cursor:default; id=hiddenQuitar1

/form

/divdiv id=DIVImageFile_2
name=DIVImageFile_2 style=position: absolute;filter:
alpha(opacity=0); top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen2
id=frmImagen2 action=""
method=post encType=multipart/form-data
target=responseFrame

div style=filter: alpha(opacity=0); width: 83px;
height: 86px;

 input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile2 name=as_image_file
value= >

 input type=hidden
id=FILEProductImageTmp_2 name=FILEProductImageTmp_2
value=


INPUT TYPE=hidden NAME=as_site_id
VALUE=MLA


!--INPUT TYPE=hidden NAME=as_vsite_id
VALUE=MLA--


INPUT TYPE=hidden NAME=as_item_id
VALUE=21607561


INPUT TYPE=hidden NAME=as_image_path
VALUE=052006/

/div

nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

input type=reset value=
q  
style=cursor:default; id=hiddenQuitar2

/form

/divdiv id=DIVImageFile_3
name=DIVImageFile_3 style=position: absolute;filter:
alpha(opacity=0); top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen3
id=frmImagen3 action=""
method=post encType=multipart/form-data
target=responseFrame

div style=filter: alpha(opacity=0); width: 83px;
height: 86px;

 input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile3 name=as_image_file
value= >

 input type=hidden
id=FILEProductImageTmp_3 name=FILEProductImageTmp_3
value=


INPUT TYPE=hidden NAME=as_site_id
VALUE=MLA


!--INPUT TYPE=hidden NAME=as_vsite_id
VALUE=MLA--


INPUT TYPE=hidden NAME=as_item_id
VALUE=21607561


INPUT TYPE=hidden NAME=as_image_path
VALUE=052006/

/div

nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

input type=reset value=
q  
style=cursor:default; id=hiddenQuitar3

/form

/divdiv id=DIVImageFile_4
name=DIVImageFile_4 style=position: absolute;filter:
alpha(opacity=0); top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen4
id=frmImagen4 action=""
method=post encType=multipart/form-data
target=responseFrame

div style=filter: alpha(opacity=0); width: 83px;
height: 86px;

 input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile4 name=as_image_file
value= >

 input type=hidden
id=FILEProductImageTmp_4 name=FILEProductImageTmp_4
value=


INPUT TYPE=hidden NAME=as_site_id VALUE=MLA


!--INPUT TYPE=hidden NAME=as_vsite_id
VALUE=MLA--


INPUT 

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

2006-05-22 Thread Lonny Eachus





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! 
  
  Im having troubles
trying to click some images on a
modal web dialog.
  They seem to be under div
tags, but I cant click
them
  
  Ive tried with divs,
images and frame sentences but
nothing works 
  
  Here is the html code for
that section (Ive 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