(
self,
max_page_length: int = 2048,
headless: bool = True,
slow_mo: int = 0,
timeout: int = 30000,
viewport_size: ViewportSize = {"width": 1280, "height": 720},
)
| 23 | """ |
| 24 | |
| 25 | def __init__( |
| 26 | self, |
| 27 | max_page_length: int = 2048, |
| 28 | headless: bool = True, |
| 29 | slow_mo: int = 0, |
| 30 | timeout: int = 30000, |
| 31 | viewport_size: ViewportSize = {"width": 1280, "height": 720}, |
| 32 | ): |
| 33 | self.observation_space = Box( |
| 34 | 0, |
| 35 | 255, |
| 36 | (viewport_size["height"], viewport_size["width"], 4), |
| 37 | np.uint8, |
| 38 | ) |
| 39 | # TODO: make Space[Action] = ActionSpace |
| 40 | self.action_space = get_action_space() # type: ignore[assignment] |
| 41 | self.headless = headless |
| 42 | self.slow_mo = slow_mo |
| 43 | self.reset_finished = False |
| 44 | self.timeout = timeout |
| 45 | self.viewport_size = viewport_size |
| 46 | |
| 47 | async def setup(self, config_file: Path | None = None) -> None: |
| 48 | self.context_manager = async_playwright() |
nothing calls this directly
no test coverage detected