(self, button_name: Optional[Union[str, list]] = None)
Args:
            - button_name: the name of the button

        Returns:
            button_name being clicked

        Raises:
            ValueError when button_name is not in avaliable button names
Args:
            - button_name: the name of the button
Args : - button_name : the name of the button
def click(self, button_name: Optional[Union[str, list]] = None):
        """
        Args:
            - button_name: the name of the button

        Returns:
            button_name being clicked

        Raises:
            ValueError when button_name is not in avaliable button names
        """
        # Actually, It has no difference POST to accept or dismiss
        if isinstance(button_name, str):
            self.http.post('/alert/accept', data={"name": button_name})
            return button_name

        avaliable_names = self.buttons()
        buttons: list = button_name
        for bname in buttons:
            if bname in avaliable_names:
                return self.click(bname)
        raise ValueError("Only these buttons can be clicked", avaliable_names)
def click ( self , button_name : Optional [ Union [ str , list ] ] = None ) : # Actually, It has no difference POST to accept or dismiss if isinstance ( button_name , str ) : self . http . post ( '/alert/accept' , data = { "name" : button_name } ) return button_name avaliable_names = self . buttons ( ) buttons : list = button_name for bname in buttons : if bname in avaliable_names : return self . click ( bname ) raise ValueError ( "Only these buttons can be clicked" , avaliable_names )