I have 4 ways to locate some element and want to click on it:
DOM is:
<div class="ui dropdown selection" tabindex="0">
And I locate this element by four ways:
(By.XPATH, "//div[@class='ui dropdown selection']")
(By.CSS_SELECTOR, "[class='ui dropdown selection']")
(By.CSS_SELECTOR, ".ui dropdown selection")
(By.CLASS_NAME, "ui dropdown selection")
I i just clik on element
Way 1 and 2 work, test is ok - and len(element) is 1
Way 3 and 4 don't work: NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".ui dropdown selection"} - and len(element) is 0 (Waits don't help, and Way 1, Way 2 don't require waits at all)
Could you tell me why Way 3 and Way 4 failed ?