We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44c5164 commit cf08b2bCopy full SHA for cf08b2b
examples/cdp_mode/raw_walmart.py
@@ -10,15 +10,17 @@
10
required_text = "Catan"
11
sb.cdp.press_keys('input[aria-label="Search"]', search + "\n")
12
sb.sleep(3.8)
13
- items = sb.cdp.find_elements('div[data-testid="list-view"]')
14
print('*** Walmart Search for "%s":' % search)
15
print(' (Results must contain "%s".)' % required_text)
+ unique_item_text = []
16
+ items = sb.cdp.find_elements('div[data-testid="list-view"]')
17
for item in items:
18
if required_text in item.text:
19
description = item.querySelector(
20
'[data-automation-id="product-price"] + span'
21
)
- if description:
22
+ if description and description.text not in unique_item_text:
23
+ unique_item_text.append(description.text)
24
print("* " + description.text)
25
price = item.querySelector(
26
'[data-automation-id="product-price"]'
0 commit comments