Skip to content

Commit

Permalink
selenium: fix click with async
Browse files Browse the repository at this point in the history
with async you can't chain methods
  • Loading branch information
naisanzaa committed Jul 2, 2024
1 parent cf300f1 commit 11b9b0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion automon/integrations/seleniumWrapper/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ async def action_click(
logger.debug(str(dict(
xpath=xpath,
)))
return await self.find_element(value=xpath, by=self.by.XPATH, **kwargs).click()
element = await self.find_element(value=xpath, by=self.by.XPATH, **kwargs)
return element.click()

except Exception as error:
raise Exception(error)
Expand Down

0 comments on commit 11b9b0b

Please sign in to comment.