I want to use selenium to find a div:
My code is :
self.browser.find_element_by_xpath('//div[@class="bh-headerBar-nav-item"]').click()
But I got the error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@class="bh-headerBar-nav-item"]"}
What should I do to find this div?