Skip to content

Commit ee675d6

Browse files
committed
fix: handle KeyError instead of IndexError for element bounds retrieval
1 parent 76b7535 commit ee675d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydoll/element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ async def click(self, x_offset: int = 0, y_offset: int = 0):
271271
position_to_click[0] + x_offset,
272272
position_to_click[1] + y_offset,
273273
)
274-
except IndexError:
274+
except KeyError:
275275
element_bounds = await self.get_bounds_using_js()
276276
element_bounds = json.loads(element_bounds)
277277
position_to_click = (

0 commit comments

Comments
 (0)