Skip to content

Commit 92bb1b1

Browse files
committed
Update a Stealthy Playwright example
1 parent b8c879e commit 92bb1b1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

examples/cdp_mode/playwright/raw_walmart_sync.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
item = items.nth(i)
2727
if required_text in item.inner_text():
2828
description = item.locator('[data-automation-id="product-title"]')
29-
if description and description.inner_text() not in unique_item:
29+
if (
30+
description
31+
and description.is_visible()
32+
and description.inner_text() not in unique_item
33+
):
3034
unique_item.append(description.inner_text())
3135
print("* " + description.inner_text())
3236
price = item.locator('[data-automation-id="product-price"]')

0 commit comments

Comments
 (0)