MCPcopy
hub / github.com/Textualize/textual / auto_pilot

Function auto_pilot

src/textual/_doc.py:122–140  ·  view source on GitHub ↗
(pilot: Pilot)

Source from the content-addressed store, hash-verified

120 return screenshot_path.read_text()
121
122 async def auto_pilot(pilot: Pilot) -> None:
123 app = pilot.app
124 if run_before is not None:
125 result = run_before(pilot)
126 if inspect.isawaitable(result):
127 await result
128 await pilot.pause()
129 await pilot.press(*press)
130 if hover:
131 await pilot.hover(hover)
132 await pilot.pause(0.5)
133 if wait_for_animation:
134 await pilot.wait_for_scheduled_animations()
135 await pilot.pause()
136 await pilot.pause()
137 await pilot.wait_for_scheduled_animations()
138 svg = app.export_screenshot(title=title, simplify=simplify)
139
140 app.exit(svg)
141
142 svg = cast(
143 str,

Callers 1

run_auto_pilotMethod · 0.85

Calls 7

run_beforeFunction · 0.85
hoverMethod · 0.80
export_screenshotMethod · 0.80
pauseMethod · 0.45
pressMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…