# How to test drag and drop in UITests

Issue #583

In UITests, we can use press from XCUIElement to test drag and drop

and then take screenshot

Screenshot capturing happens after the action, so it may be too late. One way is to inject launch arguments, like app.launchArguments.append("--dragdrop") to alter some code in the app.

We can also swizzle gesture recognizer to alter behavior