XCUIElement Extension Source?

I would like to create a custom gesture event trigger for my XCUITests. Is there any way I can review the source for the existing functions such as tap()?

I couldn't find any source code for extensions like these. Does anyone know if it is public? And has anyone generated a new custom gesture event?

It is currently not possible to add custom events to the low-level event generation system used by XCTest.

However, I have seen teams create gesture recognizers for unusual tap sequences to trigger events in their app during a UI test. For instance, you could attempt a 4 finger tap with this API, to trigger an in-app behavior: https://developer.apple.com/documentation/xctest/xcuielement/1618671-tap

Other similar APIs in XCTest could support this workflow as well.

XCUIElement Extension Source?
 
 
Q