0
我用下面的鼠標懸停事件無法能夠讓鼠標懸停點擊的元素在Odoo
cash=browser.find_element_by_xpath("//Select[@name='journal_id']/option[normalize-space(text())='Cash (EUR)']")
browser.implicitly_wait(2)
Hover = ActionChains(browser).move_to_element(cash)
Hover.click().build().perform()
代碼爲此,我已導入庫調用
from selenium.webdriver.common.action_chains import ActionChains
但它是給出的運行時錯誤稱爲:
ERROR: test_start (__main__.Saletest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "sale_test.py", line 106, in test_start
Hover.click().build().perform()
AttributeError: 'ActionChains' object has no attribute 'build'
----------------------------------------------------------------------
那麼是什麼錯誤?