@@ -227,14 +227,14 @@ async def element_handles(self) -> List[ElementHandle]:
227
227
228
228
@property
229
229
def first (self ) -> "Locator" :
230
- return Locator (self ._frame , f"{ self ._selector } >> nth=0" )
230
+ return Locator (self ._frame , f"{ self ._selector } >> nth=0" )
231
231
232
232
@property
233
233
def last (self ) -> "Locator" :
234
- return Locator (self ._frame , f"{ self ._selector } >> nth=-1" )
234
+ return Locator (self ._frame , f"{ self ._selector } >> nth=-1" )
235
235
236
236
def nth (self , index : int ) -> "Locator" :
237
- return Locator (self ._frame , f"{ self ._selector } >> nth={ index } " )
237
+ return Locator (self ._frame , f"{ self ._selector } >> nth={ index } " )
238
238
239
239
async def focus (self , timeout : float = None ) -> None :
240
240
params = locals_to_params (locals ())
@@ -373,6 +373,8 @@ async def screenshot(
373
373
path : Union [str , pathlib .Path ] = None ,
374
374
quality : int = None ,
375
375
omitBackground : bool = None ,
376
+ disableAnimations : bool = None ,
377
+ mask : List ["Locator" ] = None ,
376
378
) -> bytes :
377
379
params = locals_to_params (locals ())
378
380
return await self ._with_element (
@@ -549,6 +551,9 @@ async def _expect(
549
551
result ["received" ] = parse_value (result ["received" ])
550
552
return result
551
553
554
+ async def highlight (self ) -> None :
555
+ await self ._frame ._highlight (self ._selector )
556
+
552
557
553
558
class FrameLocator :
554
559
def __init__ (self , frame : "Frame" , frame_selector : str ) -> None :
0 commit comments