You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copy file name to clipboardExpand all lines: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,45 @@ We believe that powerful automation shouldn't require you to become an expert in
47
47
48
48
## What's New
49
49
50
+
### Remote connections via WebSocket — control any Chrome from anywhere!
51
+
52
+
You asked for it, we delivered. You can now connect to an already running browser remotely via its WebSocket address and use the full Pydoll API immediately.
# Full power unlocked: navigation, element automation, requests, events…
61
+
await tab.go_to('https://example.com')
62
+
title =await tab.execute_script('return document.title')
63
+
print(title)
64
+
```
65
+
66
+
This makes it effortless to run Pydoll against remote/CI browsers, containers, or shared debugging targets — no local launch required. Just point to the WS endpoint and automate.
67
+
68
+
### Navigate the DOM like a pro: get_children_elements() and get_siblings_elements()
69
+
70
+
Two delightful helpers to traverse complex layouts with intention:
# Want to go deeper? This will return children of children (and so on)
78
+
elements =await container.get_children_elements(max_depth=2)
79
+
80
+
# Walk horizontal lists without re-querying the DOM
81
+
active =await tab.find(class_name='item-active')
82
+
siblings =await active.get_siblings_elements()
83
+
84
+
print(len(cards), len(siblings))
85
+
```
86
+
87
+
Use them to cut boilerplate, express intent, and keep your scraping/automation logic clean and readable — especially in dynamic grids, lists and menus.
88
+
50
89
### WebElement: state waiting and new public APIs
51
90
52
91
- New `wait_until(...)` on `WebElement` to await element states with minimal code:
title =await tab.execute_script('return document.title')
76
+
print(title)
77
+
78
+
asyncio.run(main())
79
+
```
80
+
81
+
Perfect for CI, containers, remote hosts, or shared debugging targets—no local launch required. Just provide the WS endpoint and automate.
82
+
83
+
### Bring your own CDP: wrap existing sessions with Pydoll objects
84
+
85
+
If you already have your own CDP integration, you can still leverage Pydoll’s high-level API by wiring it to an existing DevTools session. As long as you know an element’s `objectId`, you can create a `WebElement` directly:
86
+
87
+
```python
88
+
from pydoll.connection import ConnectionHandler
89
+
from pydoll.elements.web_element import WebElement
90
+
91
+
# Your DevTools WebSocket endpoint and an element objectId you resolved via CDP
This hybrid approach lets you blend your low-level CDP tooling (for discovery, instrumentation, or custom flows) with Pydoll’s ergonomic element API.
106
+
60
107
## Intuitive Element Finding
61
108
62
109
Pydoll v2.0+ introduces a revolutionary approach to finding elements that's both more intuitive and more powerful than traditional selector-based methods.
@@ -137,6 +184,44 @@ async def query_examples():
137
184
asyncio.run(query_examples())
138
185
```
139
186
187
+
### DOM Traversal Helpers: get_children_elements() and get_siblings_elements()
188
+
189
+
These helpers let you traverse the DOM tree from a known anchor, preserving scope and intent.
- DOM is a tree: breadth expands quickly with depth. Prefer small max_depth values and apply tag_filter to minimize work.
221
+
- Ordering: children follow document order; siblings follow the parent’s order for stable iteration.
222
+
- iFrames: each iframe has its own tree. Use `tab.get_frame(iframe_element)` to traverse inside the frame, then call these helpers there.
223
+
- Large documents: deep traversals can touch many nodes. Combine shallow traversal with targeted `find()`/`query()` on subtree anchors for best performance.
224
+
140
225
## Native Cloudflare Captcha Bypass
141
226
142
227
!!! warning "Important Information About Captcha Bypass"
0 commit comments