File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44def extract_click_coordinates (text : str ) -> tuple [int , int ]:
55 pattern = r"<click>(\d+),\s*(\d+)"
66 matches = re .findall (pattern , text )
7+ if not matches :
8+ msg = f"No click coordinates found in text: { text } "
9+ raise ValueError (msg )
710 x , y = matches [- 1 ]
811 return int (x ), int (y )
Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ def _get_selected_device(self) -> AndroidDevice:
436436 devices : list [AndroidDevice ] = self ._get_connected_devices ()
437437
438438 if not self ._device :
439- msg = "No device is selected, did you call on of the set_device methods?"
439+ msg = "No device is selected, did you call one of the set_device methods?"
440440 raise AndroidAgentOsError (msg )
441441
442442 for device in devices :
@@ -447,7 +447,7 @@ def _get_selected_device(self) -> AndroidDevice:
447447
448448 def _check_if_display_is_selected (self ) -> None :
449449 if self ._selected_display is None :
450- msg = "No display is selected, did you call on of the set_display methods?"
450+ msg = "No display is selected, did you call one of the set_display methods?"
451451 raise AndroidAgentOsError (msg )
452452
453453 def _get_connected_devices (self ) -> list [AndroidDevice ]:
You can’t perform that action at this time.
0 commit comments