Skip to content

Commit

Permalink
Merge pull request #72 from gregpr07/hot-fix/buildDomTreejs-not-found3
Browse files Browse the repository at this point in the history
Hot fix/build dom treejs not found3
  • Loading branch information
MagMueller authored Nov 29, 2024
2 parents a34dd1a + 024c338 commit df1f988
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion browser_use/dom/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def get_clickable_elements(self, highlight_elements: bool = True) -> DOMSt
return DOMState(element_tree=element_tree, selector_map=selector_map)

async def _build_dom_tree(self, highlight_elements: bool) -> DOMElementNode:
js_code = resources.files('browser_use.dom').joinpath('buildDomTree.js').read_text()
js_code = resources.read_text('browser_use.dom', 'buildDomTree.js')

eval_page = await self.page.evaluate(
js_code, [highlight_elements]
Expand Down
15 changes: 2 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Make websites accessible for AI agents"
authors = [
{ name = "Gregor Zunic" }
]
version = "0.1.14"
version = "0.1.15"
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
Expand Down Expand Up @@ -46,15 +46,4 @@ docstring-code-format = true

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["browser_use"]

[tool.hatch.build.targets.wheel.force-include]
"browser_use/dom/buildDomTree.js" = "browser_use/dom/buildDomTree.js"

[tool.hatch.build]
include = [
"browser_use/**/*.js",
]
build-backend = "hatchling.build"

0 comments on commit df1f988

Please sign in to comment.