click(by_js=False)时,即使判断遮挡也会进行点击

This commit is contained in:
g1879 2023-03-13 18:04:31 +08:00
parent 62d41900e1
commit 387bc8a047

View File

@ -1655,7 +1655,7 @@ class Click(object):
if not by_js:
try:
self._ele.scroll.to_see()
if self._ele.states.is_in_viewport and not self._ele.states.is_covered:
if (self._ele.states.is_in_viewport and not self._ele.states.is_covered) or by_js is False:
client_x, client_y = self._ele.locations.viewport_click_point
self._click(client_x, client_y)
self._ele.page.wait.load_start(wait_loading)