capybara/session_matchers.py
def has_current_path(self, path, **kwargs):
        """
        Checks if the page has the given path.

        Args:
            path (str | RegexObject): The string or regex that the current "path" should match.
            **kwargs: Arbitrary keyword arguments for :class:`CurrentPathQuery`.

        Returns:
            bool: Whether it matches.
        """

        try:
            return self.assert_current_path(path, **kwargs)
        except ExpectationNotMet:
            return False
def has_current_path(self, path, **kwargs):
        try:
            return self.assert_current_path(path, **kwargs)
        except ExpectationNotMet:
            return False
def has_current_path ( self , path , * * kwargs ) : try : return self . assert_current_path ( path , * * kwargs ) except ExpectationNotMet : return False
Checks if the page has the given path.

        Args:
            path (str | RegexObject): The string or regex that the current "path" should match.
            **kwargs: Arbitrary keyword arguments for :class:`CurrentPathQuery`.

        Returns:
            bool: Whether it matches.
Checks if the page has the given path .