@fluent<EOL><INDENT>def touch(self, name, args=None):<DEDENT>
if isinstance(name, list) and not isinstance(name, str):<EOL><INDENT>for obj in name:<EOL><INDENT>obj['<STR_LIT>'] = self.element_id<EOL><DEDENT>actions = name<EOL><DEDENT>elif isinstance(name, str):<EOL><INDENT>if not args:<EOL><INDENT>args = {}<EOL><DEDENT>args['<STR_LIT:type>'] = name<EOL>args['<STR_LIT>'] = self.element_id<EOL>actions = [args]<EOL><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>self._driver._execute(Command.PERFORM_ACTIONS, {<EOL>'<STR_LIT>': actions<EOL>})<EOL>
Apply touch actions on devices. Such as, tap/doubleTap/press/pinch/rotate/drag.
            See more on https://github.com/alibaba/macaca/issues/366.

        Support:
            Android iOS

        Args:
            name(str): Name of the action
            args(dict): Arguments of the action

        Returns:
            WebDriver Object.

        Raises:
            WebDriverException.