“unknown error: cannot read property ‘scrollleft’ of null” in Chrome using selenium

You need to invoke Click() once the element is returned through WebDriverWait as follows:

IWebElement element = wait.Until(d => d.FindElement(locator));
new WebDriverWait(driver, TimeSpan.FromSeconds(10)).Until(ExpectedConditions.ElementToBeClickable(element)).Click();

Leave a Comment