Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

Commit d64bce8

Browse files
authored
Merge pull request #55 from lmnr-ai/dev
Dev
2 parents 5216647 + a1ab09e commit d64bce8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

index/browser/browser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ async def switch_to_tab(self, page_id: int) -> None:
307307
self.current_page = page
308308

309309
await page.bring_to_front()
310-
await page.wait_for_load_state()
310+
await page.wait_for_load_state('domcontentloaded')
311311

312312
async def create_new_tab(self, url: str | None = None) -> None:
313313
"""Create a new tab and optionally navigate to a URL"""
@@ -317,7 +317,7 @@ async def create_new_tab(self, url: str | None = None) -> None:
317317
new_page = await self.context.new_page()
318318
self.current_page = new_page
319319

320-
await new_page.wait_for_load_state()
320+
await new_page.wait_for_load_state('domcontentloaded')
321321

322322
if url:
323323
await new_page.goto(url, wait_until='domcontentloaded')

index/controller/default_actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ async def search_google(query: str, browser: Browser):
5050
Open google search in new tab and search for the query.
5151
"""
5252
page = await browser.get_current_page()
53-
await page.goto(f'https://www.google.com/search?q={query}&udm=14')
54-
await page.wait_for_load_state()
53+
await page.goto(f'https://www.google.com/search?q={query}&udm=14', wait_until='domcontentloaded')
54+
await asyncio.sleep(1)
5555
msg = f"Searched for '{query}' in Google"
5656
logger.info(msg)
5757
return ActionResult(content=msg)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ packages = ["index"]
1010

1111
[project]
1212
name = "lmnr-index"
13-
version = "0.1.12"
13+
version = "0.1.13"
1414
description = "Index - SOTA browser AI agent for autonomous task execution on the web"
1515
readme = "README.md"
1616
requires-python = ">=3.10"

0 commit comments

Comments
 (0)