I have the following snippet of code:
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
wait.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.Id("loginButton")));
driver.FindElementById("loginButton").Click();
wait.Until(JavascriptInjector.GetDocumentReadyState(driver) == expectedReadyState);
JavascriptInjector.GetDocumentReadyState(driver)
executes return document.readyState
in the Chrome browser and returns the value as a string. expectedReadyState
is of type string
. However, I am getting the following error:
"The type argument cannot be inferred from the usage."
Any suggestions as to how to get past this error?