Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error documente raises variable with error #18

Open
JCHacking opened this issue Oct 24, 2023 · 0 comments
Open

Error documente raises variable with error #18

JCHacking opened this issue Oct 24, 2023 · 0 comments

Comments

@JCHacking
Copy link

If I have the following code, it gives me error because it is not documented error in Raises, but it should document PlaywrightError instead of error

    async def fill(self, text: str, time_wait: int = 0) -> None:
        """Write text into the fragment.

        Args:
            text: What we want to write.
            time_wait: Time to wait for the action that executes those keys to complete. (Milliseconds)

        Raises:
            InvalidActionError: Fragment not support fill
        """
        try:
            await self.__fragment.fill(text)
            await asyncio.sleep(time_wait / 1000)
        except PlaywrightError as error:
            if "Element is not an <input>, <textarea> or [contenteditable] element" in error.message:
                raise InvalidActionError(self._css_query, "fill")
            raise error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant