robotframework / OldSeleniumLibrary

Deprecated Selenium library for Robot Framework
Apache License 2.0
13 stars 3 forks source link

Click image keyword should also work for images inside form #11

Closed spooning closed 9 years ago

spooning commented 9 years ago

Originally submitted to Google Code by m.marag... on 20 Nov 2008

What steps will reproduce the problem?

  1. click image in a page with source similar to the following

<FORM ACTION='/opt/cgi-bin/example.cgi' METHOD='POST'> <H3>Example</H3> <TABLE BORDER=1> <TR><TD><B>A List</B></TD><TD> <SELECT NAME='1' SIZE=1><OPTION VALUE='(empty)'>No selection</OPTION> <OPTION SELECTED VALUE='hello'>hellot</OPTION> </SELECT></TD></TR> <TR><TD><B>Example...</B></TD><TD><INPUT NAME='10' TYPE=TEXT SIZE=10 VALUE='14' MAXLENGTH=10></TD><TR> </TABLE><br><br> <INPUT TYPE=IMAGE SRC='/images/savebutton.gif' BORDER=0></FORM>

What is the expected output? What do you see instead?

ERROR: Element xpath=//img[@⁠id="/images/savebutton.gif" or @⁠src="/images/savebutton.gif" or @⁠alt="/images/savebutton.gif"] not found

What version of the product are you using? On what operating system?

Latest Selenium 2.0.2 Please provide any additional information below.

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 20 Nov 2008

Thanks for reporting, I'll take a look at this next week

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 28 Nov 2008

Click Image normally works on images that are inside <a> tag, ie. links. In this case, the image is inside a form, and in an input tag. You can already submit the form with Submit Form keyword, but I will add a support for clicking images directly inside a form to next version of SeleniumLibrary

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 28 Nov 2008

The fix that makes the original case to pass is implemented in r86.

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 5 Dec 2008

This was included in 2.1, right?