Skip to content

Commit 7591ce8

Browse files
committed
Remove standalone computer-action README section
1 parent 39a4534 commit 7591ce8

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

‎README.md‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -438,38 +438,6 @@ accepted backend build. Uploads have a separate inactivity allowance
438438
`build_image_from_dockerfile` and `build_image_from_docker_image` methods retain
439439
their explicit-name behavior and continue to report build conflicts directly.
440440

441-
## Computer action cursor and modifier keys
442-
443-
Read the cursor in physical desktop pixels, or hold an xdotool key chord during a
444-
click, drag or scroll. Use `scroll_at_cursor()` to scroll at the current pointer.
445-
These methods are available on both `Hyperbrowser` and `AsyncHyperbrowser`.
446-
447-
```python
448-
from hyperbrowser import Hyperbrowser
449-
from hyperbrowser.models import ComputerActionResponseDataCursorPosition
450-
451-
client = Hyperbrowser()
452-
session = client.sessions.create()
453-
try:
454-
result = client.computer_action.cursor_position(session)
455-
if isinstance(result.data, ComputerActionResponseDataCursorPosition):
456-
print(result.data.x, result.data.y)
457-
client.computer_action.click(session, 100, 200, keys=["Control_L"])
458-
client.computer_action.drag(
459-
session, [{"x": 100, "y": 200}, {"x": 200, "y": 300}], keys=["Shift_L"]
460-
)
461-
client.computer_action.scroll_at_cursor(session, scroll_y=2, keys=["Control_L"])
462-
finally:
463-
client.sessions.stop(session.id)
464-
client.close()
465-
```
466-
467-
Existing positional arguments remain unchanged; `keys` is appended and optional.
468-
`scroll()` still requires coordinates; `scroll_at_cursor()` scrolls at the current
469-
pointer. All actions, including `cursor_position()`, return `ComputerActionResponse`.
470-
Check that `data` is `ComputerActionResponseDataCursorPosition` before accessing
471-
coordinates. The general action enum and request/response unions include cursor position.
472-
473441
## License
474442

475443
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)