File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -254,14 +254,19 @@ export async function clickRecordButton(page: Page) {
254
254
const selector = '[data-testid="record-btn"]' ;
255
255
await waitForSelector ( page , selector ) ;
256
256
const start = / S t a r t / . test ( await getAttribute ( page , selector , "title" ) ) ;
257
- await clickSelector ( page , selector ) ;
258
-
259
- await waitForAttribute (
260
- page ,
261
- selector ,
262
- "title" ,
263
- start ? / S t o p R e c o r d i n g / : / S t a r t R e c o r d i n g / ,
264
- ) ;
257
+ await clickSelector ( page , selector , {
258
+ async retryUntil ( ) {
259
+ await page . evaluate (
260
+ ( s , start ) => {
261
+ return ( start ? / S t o p R e c o r d i n g / : / S t a r t R e c o r d i n g / ) . test (
262
+ document . querySelector ( s ) . title ,
263
+ ) ;
264
+ } ,
265
+ selector ,
266
+ start ,
267
+ ) ;
268
+ } ,
269
+ } ) ;
265
270
}
266
271
267
272
// TODO: This might clash with windowing
You can’t perform that action at this time.
0 commit comments