MCPcopy
hub / github.com/microsoft/playwright-python / locator

Method locator

playwright/_impl/_page.py:927–941  ·  view source on GitHub ↗
(
        self,
        selector: str,
        hasText: Union[str, Pattern[str]] = None,
        hasNotText: Union[str, Pattern[str]] = None,
        has: "Locator" = None,
        hasNot: "Locator" = None,
    )

Source from the content-addressed store, hash-verified

925 return await self._main_frame.fill(**locals_to_params(locals()))
926
927 def locator(
928 self,
929 selector: str,
930 hasText: Union[str, Pattern[str]] = None,
931 hasNotText: Union[str, Pattern[str]] = None,
932 has: "Locator" = None,
933 hasNot: "Locator" = None,
934 ) -> "Locator":
935 return self._main_frame.locator(
936 selector,
937 hasText=hasText,
938 hasNotText=hasNotText,
939 has=has,
940 hasNot=hasNot,
941 )
942
943 def get_by_alt_text(
944 self, text: Union[str, Pattern[str]], exact: bool = None

Calls

no outgoing calls