{ var Button = driver.FindElement(By.XPath("XPath")); // where 'Button' is whatever is giving the error js.ExecuteScript("arguments[0].click()", Button); }