iOS 16 - driver.get_clipboard_text() gets stuck
See original GitHub issuehi 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!
Issue Analytics
- State:
- Created a year ago
- Comments:17 (1 by maintainers)
Top Results From Across the Web
iOS 16 stuck on progress bar for 48 hrs. - Apple Community
I decided to upgrade to iOS 16 on Sunday night, well it got stuck on the black screen with the progress bar so...
Read more >Get Clipboard - Appium
Open the application under test with the Activate App. Support. Appium Server. Platform, Driver, Platform Versions, Appium Version, Driver Version. iOS ...
Read more >How to Fix iOS 16 Update Stuck on Terms and ... - YouTube
iOS 16 update stuck at Terms and Conditions, Cannot agree the ... Fix Your Apple iD Or Password Is Incorrect On iPhone /...
Read more >Problems downloading iOS 16? Here's how to fix it fast - ZDNet
1. First thing to get out of the way is whether your iPhone can run iOS 16.If you have one of the following,...
Read more >Automating the Clipboard on iOS and Android - HeadSpin
assertEquals(driver.getClipboardText(), text);. Here, all we're doing is entering a unique string into the text field, and hitting the "Set ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The patch has been published in xcuitest driver v 4.10.2
hi @mykola-mokhnach,
I’ve replaced
FBPasteboard.m
in/Users/tester/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgentLib/Utilities
then disabled
usePrebuiltWDA
andderivedDataPath
then ran the test and I think we’re good now 😃 the dialog gets automatically dismissed by pressing ‘Allow Paste’ , it also reads the data from the clipboard.
can we have this tweak in master? forgot to mention that it’s working fine without
'autoAcceptAlerts': True
Thanks!