As the following code shows, clicking the element by the WebElement.click() method works, while JavascriptExecutor.executeScript fails ( works in most situaitons ).
WebElement e = driver.findElement(By.xpath("......."));//some kind of checkbox
e.click(); //works fine.
((JavascriptExecutor) aw.driver).executeScript("arguments[0].click();",e);
//executes with no exception, but the element is not selected.
The page's source code is too complex to paste here, sorry.
Any clue or tip for debugging this problem?
The element's html code, It's a extjs-style checkbox:
<td class="x-grid3-hd x-grid3-cell x-grid3-td-checker x-grid3-cell-first " style="width: 20px;">
<div class="x-grid3-hd-inner x-grid3-hd-checker" id="ext-gen108" unselectable="on" _nodup="30805">
<div class="x-grid3-hd-checker" _nodup="30805" />
</div></td>
I have tried click each of td, td/div , td/div/div elements , getting same result: WebElement.click() works, JavascriptExecutor.executeScript fails(No exception, but the checkbox is not checked).