improve chain click logic (#4168)
This commit is contained in:
@@ -2338,7 +2338,8 @@ async def chain_click(
|
|||||||
locator=locator,
|
locator=locator,
|
||||||
)
|
)
|
||||||
if bound_locator := await skyvern_element.find_bound_label_by_attr_id():
|
if bound_locator := await skyvern_element.find_bound_label_by_attr_id():
|
||||||
await bound_locator.click(timeout=timeout)
|
# click on (0, 0) to avoid playwright clicking on the wrong element by accident
|
||||||
|
await bound_locator.click(timeout=timeout, position={"x": 0, "y": 0})
|
||||||
action_results.append(ActionSuccess())
|
action_results.append(ActionSuccess())
|
||||||
return action_results
|
return action_results
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -2354,7 +2355,8 @@ async def chain_click(
|
|||||||
locator=locator,
|
locator=locator,
|
||||||
)
|
)
|
||||||
if bound_locator := await skyvern_element.find_bound_label_by_direct_parent():
|
if bound_locator := await skyvern_element.find_bound_label_by_direct_parent():
|
||||||
await bound_locator.click(timeout=timeout)
|
# click on (0, 0) to avoid playwright clicking on the wrong element by accident
|
||||||
|
await bound_locator.click(timeout=timeout, position={"x": 0, "y": 0})
|
||||||
action_results.append(ActionSuccess())
|
action_results.append(ActionSuccess())
|
||||||
return action_results
|
return action_results
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user