Skip to content

Commit 9ee8096

Browse files
remove saving the tree
1 parent a8fe211 commit 9ee8096

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

examples/example.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ async def main():
8484
# Get accessibility tree
8585
tree = await get_accessibility_tree(stagehand.page, stagehand.logger)
8686
console.print("[success]✓ Extracted accessibility tree[/]")
87-
with open("../tree.txt", "w") as f:
88-
f.write(tree.get("simplified"))
89-
87+
9088
print("ID to URL mapping:", tree.get("idToUrl"))
9189
print("IFrames:", tree.get("iframes"))
9290

@@ -165,8 +163,6 @@ async def main():
165163

166164
# Get accessibility tree for the new page
167165
tree = await get_accessibility_tree(new_page, stagehand.logger)
168-
with open("../tree.txt", "w") as f:
169-
f.write(tree.get("simplified"))
170166
console.print("[success]✓ Extracted accessibility tree for new page[/]")
171167

172168
# Try clicking Get Started button on Google

0 commit comments

Comments
 (0)