Skip to content

Commit 1b3f019

Browse files
brylee10julianocosta89
authored andcommitted
fix: replace nonexistent wait_until param from playwright page API call (open-telemetry#2374)
* fix: remove nonexistent `wait_until` param from playwright page API call * chore: add playwright `wait_until` fix to change log * delete trailing space --------- Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
1 parent c41a2c9 commit 1b3f019

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ the release.
7676
([#2352]((https://github.com/open-telemetry/opentelemetry-demo/pull/2352)))
7777
* [image-provider] Update to latest version of nginx and alpine
7878
([#2369](https://github.com/open-telemetry/opentelemetry-demo/pull/2369))
79+
* [load-generator] Fix Playwright wait until load state error
80+
([#2374](https://github.com/open-telemetry/opentelemetry-demo/pull/2374))
7981

8082
## 2.0.2
8183

src/load-generator/locustfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ async def add_product_to_cart(self, page: PageWithRetry):
248248
page.on("console", lambda msg: print(msg.text))
249249
await page.route('**/*', add_baggage_header)
250250
await page.goto("/", wait_until="domcontentloaded")
251-
await page.click('p:has-text("Roof Binoculars")', wait_until="domcontentloaded")
252-
await page.click('button:has-text("Add To Cart")', wait_until="domcontentloaded")
251+
await page.click('p:has-text("Roof Binoculars")')
252+
await page.wait_for_load_state("domcontentloaded")
253+
await page.click('button:has-text("Add To Cart")')
254+
await page.wait_for_load_state("domcontentloaded")
253255
await page.wait_for_timeout(2000) # giving the browser time to export the traces
254256
logging.info("Product added to cart successfully")
255257
except Exception as e:

0 commit comments

Comments
 (0)