_driver.FindElement(By.CssSelector("[id$='_NewSiteMaintenanceButton']"));
The line above works with Chrome AND FireFox, but when I try to execute it in IE I get:
Test Outcome: Failed Result
Message: OpenQA.Selenium.NoSuchElementException : Unable to find element with css selector == [id$='_NewSiteSearch_listbox'] Result StackTrace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByCssSelector(String cssSelector)
at OpenQA.Selenium.By.<>c__DisplayClass1e.b__1c(ISearchContext context)
at OpenQA.Selenium.By.FindElement(ISearchContext context)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
What causes this, and how should I resolve it?
EDIT: Explicitly calling it:
_driver.FindElement(By.CssSelector("[id='#3_NewSiteMaintenanceButton']"));
Fails too, whereas in Chrome AND FireFox that works
$part of attribute? - Saifurdocument.querySelector('[id$='_NewSiteMaintenanceButton']')...what do you get? - Arran