chromeflow 0.1.34 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +34 -0
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -149,4 +149,38 @@ screenshot to check what happened.
|
|
|
149
149
|
|
|
150
150
|
**Waiting for async results** (build, save, deploy): `wait_for_selector(selector, timeout)` — never poll with screenshots.
|
|
151
151
|
|
|
152
|
+
**React Select / custom styled dropdowns** (e.g. "Select..." components on DataAnnotation):
|
|
153
|
+
`click_element` and `fill_input` do NOT work on these — they intercept native events. Use
|
|
154
|
+
`execute_script` directly:
|
|
155
|
+
|
|
156
|
+
```js
|
|
157
|
+
// 1. Open the menu — click the control div (filter by pageY if multiple)
|
|
158
|
+
var controls = document.querySelectorAll('[class*="control"]');
|
|
159
|
+
controls[N].click();
|
|
160
|
+
|
|
161
|
+
// 2. Pick an option by exact text
|
|
162
|
+
var allEls = document.querySelectorAll('*');
|
|
163
|
+
for (var i = 0; i < allEls.length; i++) {
|
|
164
|
+
if (allEls[i].textContent.trim() === 'Target Option' && allEls[i].children.length === 0) {
|
|
165
|
+
allEls[i].dispatchEvent(new MouseEvent('mousedown', {bubbles: true}));
|
|
166
|
+
allEls[i].click();
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// 3. Verify
|
|
172
|
+
controls[N].textContent.trim(); // should show selected value
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Page content rendered as images** (e.g. qualification "Examples" tabs that show PNG screenshots
|
|
176
|
+
instead of DOM text): `get_page_text()` returns nothing useful. Zoom out and screenshot instead:
|
|
177
|
+
|
|
178
|
+
```js
|
|
179
|
+
// Shrink to fit wide content, then screenshot
|
|
180
|
+
document.body.style.zoom = '0.4';
|
|
181
|
+
// use take_and_copy_screenshot() to read it
|
|
182
|
+
// restore afterward:
|
|
183
|
+
document.body.style.zoom = '1';
|
|
184
|
+
```
|
|
185
|
+
|
|
152
186
|
**Never use Bash to work around a stuck browser interaction.**
|
package/package.json
CHANGED