question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS 16 - driver.get_clipboard_text() gets stuck

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mykola-mokhnachcommented, Aug 22, 2022

The patch has been published in xcuitest driver v 4.10.2

0reactions
shakycommented, Aug 22, 2022

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 and derivedDataPath

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found