Cypress . Commands . add ( 'paste' , { prevSubject : true , } , paste ) ; param subject param pasteOptions param pasteOptions . pastePayload param pasteOptions . simple param pasteOptions . pasteFormat returns example export function paste ( subject , { pastePayload = '' , simple = false } ) { if ( simple ) { subject [ 0 ] . value = pastePayload ; return ; } const dt = new DataTransfer ( ) ; dt . setData ( 'text/plain' , pastePayload ) ; const pasteEvent = new ClipboardEvent ( 'paste' , { clipboardData : dt , bubbles : true , cancelable : true , } ) ; subject [ 0 ] . dispatchEvent ( pasteEvent ) ; return subject ; }