我要等待一些元素的外觀,我用: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