webdriverio / webdriverio/webdriverio
[🐛 Bug]: Drag drop is not working
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 9.8k
- Forks
- 2.7k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 69
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
7.16.13
Node.js Version
v16.13.1
Mode
WDIO Testrunner
Which capabilities are you using?
{
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
// grid with only 5 firefox instances available you can make sure that not more than
// 5 instances get started at a time.
maxInstances: 5,
//
browserName: 'chrome',
acceptInsecureCerts: true
// If outputDir is provided WebdriverIO can capture driver session logs
// it is possible to configure which logTypes to include/exclude.
// excludeDriverLogs: ['*'], // pass '*' to exclude all driver session logs
// excludeDriverLogs: ['bugreport', 'server'],
}
What happened?
I tried to drag $(modelSchemaString.replace("[MODEL_NAME]", 'Calendar')) element and drop to $("//div[@id='mfgx-data-flow-diagram']")_ but I could not get success. Adding the dragAndDrop method below for reference
async dragAndDrop() {
var modelSchemaString = "//div[@id='toolbox-stub-[MODEL_NAME]']";
await $(modelSchemaString.replace("[MODEL_NAME]", 'Calendar')).waitForDisplayed({ timeout: 120000 });
const target = await $("//div[@id='mfgx-data-flow-diagram']");
await $(modelSchemaString.replace("[MODEL_NAME]", 'Calendar')).dragAndDrop(target)
await browser.pause(5000)
await $(modelSchemaString.replace("[MODEL_NAME]", 'CalendarEvent')).dragAndDrop(target)
await browser.pause(5000)
}
Element details of source element $(modelSchemaString.replace("[MODEL_NAME]", 'Calendar')) is :

Element details of target element $("//div[@id='mfgx-data-flow-diagram']") is :

Element dragging is successful in my case but dropping is not getting success.
What is your expected behavior?
Drag and drop should happen successfully.
How to reproduce the bug.
Added details in What happened section
Relevant log output
No log file was generated.
Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the dragAndDrop method shown in the report and reproduce the case using the Calendar source and mfgx-data-flow-diagram target. Compare the successful drag with the failed drop and verify the behavior against the reported WebdriverIO 7.16.13 setup; done means the element is dropped successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100