I am trying to automate the download of information from the company web-portals. I need to specify a custom date range (in other parts of the code).
The page html is in the following format
<div id="datePickerIconWrap" class="float_lang_base_2 datePickerIconWrap"><span class="datePickerIcon"> </span></div>
I have tried specifying the item by either class_name
and id
; but both fails
import os
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
url = '<my url>'
driver = webdriver.Chrome("Y:/Users/admin/Documents/chromedriver.exe")
driver.get(url)
driver.find_element_by_id('datePickerIconWrap').click()
driver.find_element_by_class_name('float_lang_base_2 datePickerIconWrap').click()
I get the error message below for .find_element_by_id
ElementNotVisibleException: Message: element not visible
I get the error message below for .find_element_by_class
InvalidSelectorException: Message: invalid selector: Compound class names not permitted
(Session info: chrome=68.0.3440.106)