Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to tap on system photo picker #help-wanted #1272

Open
lukaszkn opened this issue Dec 15, 2022 · 1 comment
Open

How to tap on system photo picker #help-wanted #1272

lukaszkn opened this issue Dec 15, 2022 · 1 comment

Comments

@lukaszkn
Copy link

lukaszkn commented Dec 15, 2022

Any idea how to tap photo or at least cancel button on system photo picker?
I've tried:
[tester tapAccessibilityElement:]
[tester tapScreenAtPoint:]
[tester tapViewWithAccessibilityLabel:@"Cancel"];
[tester dismissPopover]

None of these above do anything.

(lldb) po [UIView printViewHierarchy]
Window level 0.000000 (key window)
...
|	UITransitionView
|	|	UIDimmingView
|	|	UIDropShadowView
|	|	|	_UIRoundedRectShadowView (not highlighted)
|	|	|	UIView
|	|	|	|	UIView
|	|	|	|	|	UILayoutContainerView
|	|	|	|	|	|	UINavigationTransitionView
|	|	|	|	|	|	|	UIViewControllerWrapperView
|	|	|	|	|	|	|	|	_UISizeTrackingView
|	|	|	|	|	|	|	|	|	_UIRemoteView, identifier: RemoteViewBridge
|	|	|	|	|	|	|	|	|	AXRemoteElement, label: (null), traits: none
|	|	|	|	|	|	UIToolbar, label: Toolbar, identifier: Toolbar (invisible)
|	|	|	|	|	|	|	_UIBarBackground
|	|	|	|	|	|	|	|	UIVisualEffectView
|	|	|	|	|	|	|	|	|	_UIVisualEffectBackdropView
|	|	|	|	|	|	|	|	_UIBarBackgroundShadowView
|	|	|	|	|	|	|	|	|	_UIBarBackgroundShadowContentImageView (not highlighted)

Window level 1.000000
UITextEffectsWindow
|	UIInputSetContainerView
|	|	UIInputSetHostView
|	_UITextEffectsRemoteView, identifier: RemoteViewBridge
|	AXRemoteElement, label: (null), traits: none

Simulator Screen Shot - iPhone SE (3rd generation)

@justinseanmartin
Copy link
Contributor

I believe this is one of the things hosted out of process on modern iOS versions. The best way to workaround it is to swizzle the photo picker APIs and replace the system implementation with something that either presents some alternate UI in process, or automatically calls the expected response APIs without user interaction.

We have a bunch of tickets (#1156 #1266 #1267) tracking finding a solution to interact with UI elements hosted out of process. Until that is resolved, we're blocked here with the above workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants