If I select flight departure time with class name through selenium in python but class name is used by both div & span tags it fails.
How can I select only one element type (div) and not sdpans.
my code is:
[element.text for element in self.browser.find_elements(By.CLASS_NAME, "dept-time")]