Hi,
I am trying find a different way to reference an image that is a button.
This is the Exit object:
Code: Select all
<span style="position: absolute; top: 2px; cursor: pointer; left: 0px;">
<img title="Exit to Menu" class="" id="" onclick="ckSubmit(document.main,"menu.php",true);" src="../images/btn_close.jpg" complete="complete"/>
</img/>
This is the change object in the browser:
Code: Select all
<span style="position: absolute; top: 0px; cursor: pointer; left: 825px;">
<img title="Change" class="" id="" onclick="reqtype.value="MODIFY";submit();" src="../images/btn_edit.jpg" complete="complete"/>
</img/>
I currently reference it with:
Code: Select all
ie.document.getElementsByTagName("IMG")[3].Click() ; The Done Button
The issue is that there are at times upto four images between the different in the screens (all the screens have the same name). The different screens that are returned are determined by the data returned. Then each screen has a different number of buttons. The buttons can be referenced by changing the image number ([3], [4]...) but the different buttons will change numbers between screens (basically "ADD", "EDIT", "CANCEL", "SEARCH", "DONE") might be a different number depending on the data returned. So my question is is there a way to reference the objects by (img title="Change") or call the onclick using the method it's calling i.e. (onclick="reqtype.value="MODIFY";submit();) . This would enable me to be more exact because you don't know what data will be returned.
Thanks
David