You could use GetHitResultUnderCursorByChannel instead of OnClicked. Thus you can use the same logic to move your sphere manually and automatically, like a proper functional test.
I hope this will be at least somehow useful for you.