Valid action types for browser env.
| 326 | |
| 327 | |
| 328 | class ActionTypes(IntEnum): |
| 329 | """Valid action types for browser env.""" |
| 330 | |
| 331 | NONE = 0 |
| 332 | # mouse wheel and keyboard, universal across all action spaces |
| 333 | SCROLL = 1 |
| 334 | KEY_PRESS = 2 |
| 335 | |
| 336 | # low level mouse and keyboard actions |
| 337 | MOUSE_CLICK = 3 |
| 338 | KEYBOARD_TYPE = 4 |
| 339 | MOUSE_HOVER = 5 |
| 340 | |
| 341 | # mid level mouse and keyboard actions |
| 342 | CLICK = 6 |
| 343 | TYPE = 7 |
| 344 | HOVER = 8 |
| 345 | |
| 346 | # page level actions, universal across all action spaces |
| 347 | PAGE_FOCUS = 9 |
| 348 | NEW_TAB = 10 |
| 349 | GO_BACK = 11 |
| 350 | GO_FORWARD = 12 |
| 351 | GOTO_URL = 13 |
| 352 | PAGE_CLOSE = 14 |
| 353 | |
| 354 | # high-leval actions that playwright support |
| 355 | CHECK = 15 |
| 356 | SELECT_OPTION = 16 |
| 357 | |
| 358 | STOP = 17 |
| 359 | |
| 360 | def __str__(self) -> str: |
| 361 | return f"ACTION_TYPES.{self.name}" |
| 362 | |
| 363 | |
| 364 | @beartype |
nothing calls this directly
no outgoing calls
no test coverage detected