from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
wait = WebDriverWait(webdriver, 10)
elem = wait.until(EC.visibility_of_element_located(
(By.CSS_SELECTOR, '.top_layer.active-element')))
The code snippet above is functioning properly in Firefox and Chrome browsers. However, an issue arises when attempting to use it in Internet Explorer, resulting in the following error message:
Unable to find element with css selector == .top_layer.active-element (WARNING: The
server did not provide any stacktrace information) Command duration or timeout:
316 milliseconds For documentation on this error, please visit:
http://seleniumhq.org/exceptions/no_such_element.html Build info: version:
'2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33' System info: host:
'172-16-4-157', ip: '172.16.4.157', os.name: 'windows', os.arch: 'x86',
os.version: '6.2', java.version: '1.8.0_40' Driver info:
org.openqa.selenium.ie.InternetExplorerDriver
Is there a way to adjust the CSS selector so that it functions correctly in IE10 as well?