MCPcopy Index your code
hub / github.com/microsoft/playwright-python / get_by_role

Method get_by_role

playwright/_impl/_frame.py:678–706  ·  view source on GitHub ↗
(
        self,
        role: AriaRole,
        checked: bool = None,
        disabled: bool = None,
        expanded: bool = None,
        includeHidden: bool = None,
        level: int = None,
        name: Union[str, Pattern[str]] = None,
        pressed: bool = None,
        selected: bool = None,
        exact: bool = None,
        description: Union[str, Pattern[str]] = None,
    )

Source from the content-addressed store, hash-verified

676 return self.locator(get_by_placeholder_selector(text, exact=exact))
677
678 def get_by_role(
679 self,
680 role: AriaRole,
681 checked: bool = None,
682 disabled: bool = None,
683 expanded: bool = None,
684 includeHidden: bool = None,
685 level: int = None,
686 name: Union[str, Pattern[str]] = None,
687 pressed: bool = None,
688 selected: bool = None,
689 exact: bool = None,
690 description: Union[str, Pattern[str]] = None,
691 ) -> "Locator":
692 return self.locator(
693 get_by_role_selector(
694 role,
695 checked=checked,
696 disabled=disabled,
697 expanded=expanded,
698 includeHidden=includeHidden,
699 level=level,
700 name=name,
701 pressed=pressed,
702 selected=selected,
703 exact=exact,
704 description=description,
705 )
706 )
707
708 def get_by_test_id(self, testId: Union[str, Pattern[str]]) -> "Locator":
709 return self.locator(get_by_test_id_selector(test_id_attribute_name(), testId))

Callers

nothing calls this directly

Calls 2

locatorMethod · 0.95
get_by_role_selectorFunction · 0.90

Tested by

no test coverage detected