File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff 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 :
You can’t perform that action at this time.
0 commit comments