முக்கிய உள்ளடக்கத்திற்குச் செல்லவும்

இழுத்து விடுதல்

ஒரு உருப்படியை இலக்கு உறுப்பு அல்லது நிலைக்கு இழுக்கவும்.

தகவல்

இந்த கட்டளையின் செயல்பாடு உங்கள் பயன்பாட்டில் இழு மற்றும் விடு எவ்வாறு செயல்படுத்தப்பட்டுள்ளது என்பதைப் பெரிதும் சார்ந்துள்ளது. சிக்கல்கள் ஏற்பட்டால் உங்கள் எடுத்துக்காட்டை #4134 இல் பதிவிடவும்.

பயன்பாடு
$(selector).dragAndDrop(target, { duration })
அளவுருக்கள்
பெயர்வகைவிவரங்கள்
targetElement, DragAndDropCoordinateஇலக்கு உறுப்பு அல்லது x மற்றும் y பண்புகளைக் கொண்ட பொருள்
options
விருப்பத்தேர்வு
DragAndDropOptionsஇழுத்து விடுதல் கட்டளை விருப்பங்கள்
options.duration
விருப்பத்தேர்வு
Numberஇழுத்தல் எவ்வளவு நேரம் நடைபெற வேண்டும்
எடுத்துக்காட்டு
example.test.js
it('should demonstrate the dragAndDrop command', async () => {
const elem = $('#someElem')
const target = $('#someTarget')

// drag and drop to other element
await elem.dragAndDrop(target)

// drag and drop relative from current position
await elem.dragAndDrop({ x: 100, y: 200 })
})

Welcome! How can I help?

WebdriverIO AI Copilot