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

前端 未结 1 410
臣服心动
臣服心动 2020-12-07 04:37

In Chrome when I am clicking button, I am getting \"unknown error:

cannot read property \'scrollleft\' of null

Their is 1 Input field in t

相关标签:
1条回答
  • 2020-12-07 05:16

    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();
    
    0 讨论(0)
提交回复
热议问题