appium: iOS 16 - driver.get_clipboard_text() gets stuck
hi there,
I’m using:
- Python3
- 2.0.0-beta.42
- xcuitest@4.10.0
- relaxed-caps@1.0.0-beta.11
- Xcode 14 Beta 5
Problem:
My tests get stuck when it tries to execute driver.get_clipboard_text()
- that’s because of this new iOS 16 behavior https://9to5mac.com/2022/06/06/ios-16-permission-copy-paste-between-apps/
Is there a workaround for this? A simple solution will be to make driver.get_clipboard_text()
fast fail with exception if it cannot read the clipboard data so we can catch the exception and then tap on ‘Allow Paste’.
for example:
try:
clipboard_text = self.driver.get_clipboard_text()
except ClipboardException:
self.driver.find_element_by_accessibility_id('Allow Paste')
Not even sure what’s best. Thank You!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (1 by maintainers)
The patch has been published in xcuitest driver v 4.10.2