Ie Automation to click button inside iframe with no id

  • Dear Guru's,


    I need some help with an IE automation where in I have to click on a popup dialog box as "yes" and then proceed to other procedures.


    I am stuck upon the dialog box where I am unable to get the element of the button as there is no ID of the button, as per my knowledge the popup dialog box is warped inside an iFrame > table > span > form > table > dialogbox.


    I tried every possible ways to get at the dialogbox level but failing to do so, I tried looping through all button elements of iframe still it does not gives me the button element handle.


    I do not want to use sendkeys as its not full proof, I am listing done the html code for refrence and the code I am using so far.


    Any help would be really appreciated.


    I want to click on this button.


    button title="Yes" class="x80" onclick="submitForm('DefaultFormName',1,{'_FORM_SUBMIT_BUTTON':'RemovePsYesButtonlxUkUkni'});return false" type="submit">Yes</button>


    Code
    1. <span id="OADialogPopupRN"><div><div class="x6d"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr class="xbw" valign="bottom"><td><img src="/OA_HTML/cabo/images/skyros/warnl.gif" width="18" height="18" border="0" alt=""></td><td><script>var _tURL="\x2FOA_HTML\x2Fcabo\x2Fimages\x2Fskyros\x2Ft.gif";var _axm;t(5,0)</script></td><td width="100%"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td width="100%"><h1 class="x61" type="OraHeader">Warning</h1></td></tr></table></td></tr></table></div></div><table border="0" cellspacing="0" cellpadding="0"><tr><td align="left" width="580"><span class="x1">Are you sure you want to remove 1 documents?</span></td></tr><tr><td width="580" height="20"></td></tr><tr><td align="left" width="580"><span class="x0">Documents you remove from this request will need to be resubmitted for payment.</span></td></tr></table><span style="float:left" ></span><span style="float:right" ><table cellpadding="0" cellspacing="0" border="0"><tr><td><script>t(8,0)</script></td><td><button title="No" class="x80" onclick="submitForm('DefaultFormName',1,{'_FORM_SUBMIT_BUTTON':'RemovePsNoButtonvaNLJ0xM'});return false" type="submit">No</button></td><td><button title="Yes" class="x80" onclick="submitForm('DefaultFormName',1,{'_FORM_SUBMIT_BUTTON':'RemovePsYesButtonlxUkUkni'});return false" type="submit">Yes</button></td></tr></table></span></span>