I'm new to automation testing and decided to use Tumblr as my subject. I'm having trouble making the options appear, see image attached, and don't know what else to use.
The code I'm currently trying to run it to is:
driver.find_element_by_xpath("//div[@class='dropdown-area icon_arrow_carrot_down']").click()
I've also tried
find_element_by_class_name
find_element_by_class_id
implicitly wait
still get the same error.
Below is the error I'm getting.
Traceback (most recent call last):
File "C:\Users\pmevangelista\eclipse-workspace\Pytest\python1\PySel.py", line 37, in driver.find_element_by_xpath("//*[@class='dropdown-area icon_arrow_carrot_down']").click()
File "C:\Users\pmevangelista\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 365, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\pmevangelista\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 855, in find_element 'value': value})['value']
File "C:\Users\pmevangelista\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 308, in execute self.error_handler.check_response(response)
File "C:\Users\pmevangelista\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace)selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@class='dropdown-area icon_arrow_carrot_down']"} (Session info: chrome=62.0.3202.94)
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.1.7601 SP1 x86_64)
Thank you in advance for your help.
div.dropdown-area.icon_arrow_carrot_down
as css locator? It can be done using thefind_element_by_css_selector
[I think - it's been a long time since I used Python.] – demouser123 Nov 24 '17 at 15:55