browserclaw 0.10.0 → 0.10.1
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/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3118,7 +3118,7 @@ async function pressAndHoldViaCdp(opts) {
|
|
|
3118
3118
|
async function clickByTextViaPlaywright(opts) {
|
|
3119
3119
|
const page = await getRestoredPageForTarget(opts);
|
|
3120
3120
|
const timeout = resolveInteractionTimeoutMs(opts.timeoutMs);
|
|
3121
|
-
const locator = page.getByText(opts.text, { exact: opts.exact }).or(page.getByTitle(opts.text, { exact: opts.exact })).first();
|
|
3121
|
+
const locator = page.getByText(opts.text, { exact: opts.exact }).and(page.locator(":visible")).or(page.getByTitle(opts.text, { exact: opts.exact })).first();
|
|
3122
3122
|
try {
|
|
3123
3123
|
await locator.click({ timeout, button: opts.button, modifiers: opts.modifiers });
|
|
3124
3124
|
} catch (err) {
|
|
@@ -3561,7 +3561,7 @@ async function waitForViaPlaywright(opts) {
|
|
|
3561
3561
|
}
|
|
3562
3562
|
if (opts.fn !== void 0) {
|
|
3563
3563
|
if (typeof opts.fn === "function") {
|
|
3564
|
-
await page.waitForFunction(opts.fn,
|
|
3564
|
+
await page.waitForFunction(opts.fn, { timeout });
|
|
3565
3565
|
} else {
|
|
3566
3566
|
const fn = opts.fn.trim();
|
|
3567
3567
|
if (fn !== "") await page.waitForFunction(fn, void 0, { timeout });
|