On the UI I have a checkAll button which is implemented as a span under a div block. clicking it become hard so I used JavaScriptExcutor. I want click it two times. the code is as following 6 lines. the line3 always succeeded, but line 6 always fail silently (no error or exception, but click not happening). if I comment out line 3 then line 6 will function. why? please help me.
IJavaScriptExecutor executor = (IJavaScriptExecutor)drv;
IWebElement chkAll = TaskerStatus.FindElement(By.Id("header3-column0"));
executor.ExecuteScript("arguments[0].click();", chkAll);
cmdBar1collapseAll.Click();
expandAllBtn.Click();
executor.ExecuteScript("arguments[0].click();", chkAll);
document.getElementById('header3-column0').click()