Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/load-generator/locustfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,10 @@ async def add_product_to_cart(self, page: PageWithRetry):
page.on("console", lambda msg: print(msg.text))
await page.route('**/*', add_baggage_header)
await page.goto("/", wait_until="domcontentloaded")
await page.click('p:has-text("Roof Binoculars")', wait_until="domcontentloaded")
await page.click('button:has-text("Add To Cart")', wait_until="domcontentloaded")
await page.click('p:has-text("Roof Binoculars")')
await page.wait_for_load_state("domcontentloaded")
await page.click('button:has-text("Add To Cart")')
await page.wait_for_load_state("domcontentloaded")
await page.wait_for_timeout(2000) # giving the browser time to export the traces
logging.info("Product added to cart successfully")
except Exception as e:
Expand Down
Loading