So I have an input element on a page and I need to click on it to go to another page. Problem is that when I user click() or submit() on the element nothing happens. I have a custom highlight method that is working so I can see that I am actually on the correct element. The click() just seems to not be working on it for some unknown reason.
Here is the html I'm working with
<TBODY>
<TR style="" class=" STDLISTROW_O" onmouseover=listMouseOver(this); onmouseout=listMouseOut(this); saveBG>
<TD class=STDLISTBTN>
<INPUT style="COLOR: " onmouseover="listBtnMouseOver(this); window.status = this.status_txt;" onmouseout="listBtnMouseOut(this); window.status = '';" onclick=" event.cancelBubble = true; if (this.getAttribute('clicked') == 'false') { document.location.href = 'client$.startup?P_CLIENT_ID=7605677'; this.setAttribute('clicked', 'true'); } " value=ECR type=button status_txt="client$.startup?P_CLIENT_ID=7605677" clicked="false" saveBtnBG saveBtnC></TD>
Here is my Selenium/Java method
public void clickECRButtonWithID(String clientID) {
log.info("Click the ECR button for the row with client id: " + clientID);
WebElement idRow = driver.findElement(By.xpath("//td[contains(text(),'"
+ clientID + "')]/ancestor::tr"));
WebElementExtender.highlightElement(idRow);
WebElement ecrButton = driver.findElement(By.cssSelector("input[value='ECR']"));
WebElementExtender.highlightElement(ecrButton);
ecrButton.click();
}
I have also tried isolating the parent td of the input and clicking on it with no luck. I'm at a loss here.
- I need to add that I am using Internet Explorer Driver (IEDriverServer) and am on IE9 browser. Unfortunately that's all this application will run on!