我要等待一些元素的外观,我用:expected_conditions._find_element抛出一个错误:AttributeError的:“海峡”对象有没有属性“find_element”
re_enter_email_field = WebDriverWait(self.driver, 10).until(
expected_conditions._find_element(By.ID,"u_0_f"))
但每次我运行一个测试,我得到一个错误:
Error
File "/home/akop/py_workspace/MacPaw_FB/pages/LoginPage.py", line 56, in submit_new_account_form
expected_conditions._find_element(By.ID,"u_0_f"))
File "/home/akop/py_workspace/t_sade_site/site_env/lib/python3.5/site-packages/selenium/webdriver/support/expected_conditions.py", line 398, in _find_element
return driver.find_element(*by)
AttributeError: 'str' object has no attribute 'find_element'
我认为,如果它解决您的问题,你的元素不存在 – iamsankalp89