Skip to content

Commit 00bc9d0

Browse files
committed
Fix page navigation and selector wait timeouts
1 parent fd9f2e7 commit 00bc9d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llmstack/common/runner/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ async def _process_playwright_steps(self, url, steps, display, ffmpeg_process, s
168168
raise Exception(
169169
'Terminating browser because of timeout')
170170
elif step.type == runner_pb2.GOTO:
171-
await page.goto(step.data)
171+
await page.goto(step.data or page.url)
172172
elif step.type == runner_pb2.CLICK:
173173
await page.click(step.selector)
174174
elif step.type == runner_pb2.WAIT:
175-
await page.wait_for_selector(step.selector, timeout=3000)
175+
await page.wait_for_selector(step.selector or 'body', timeout=3000)
176176
elif step.type == runner_pb2.COPY:
177177
results = await page.query_selector_all(step.selector or 'body')
178178
outputs.append({

0 commit comments

Comments
 (0)