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

Provide a notification that loading is complete. #1418

Open
SittenSpynne opened this issue Nov 13, 2019 · 3 comments
Open

Provide a notification that loading is complete. #1418

SittenSpynne opened this issue Nov 13, 2019 · 3 comments

Comments

@SittenSpynne
Copy link

My Xamarin Forms application interacts with some hardware and needs permission to use Bluetooth and/or USB to function at all, so we end up triggering a permissions dialog at startup. It caused me to bump into this issue, but I think this is an inelegant solution.

If there are things that can go wrong if the application does them before Calabash finishes loading, I feel like loading Calabash should either block until it finishes or provide some mechanism to notify me it is finished. For example, I wouldn't mind inserting a loading page to my application and have "Calabash is complete" part of the criteria for that page's dismissal. That would allow me to notify the things that communicate with hardware it's OK for them to progress.

A delay works, but is inelegant. I have to guess how long, and environmental changes could make this problem rear its head again.

@SittenSpynne
Copy link
Author

Whoops, upon further investigation I decided to post this to Xamarin Forms since I need it surfaced there, but I had this window open and got confused when I picked a tab.

@jmoody
Copy link
Contributor

jmoody commented Nov 14, 2019

so we end up triggering a permissions dialog at startup. It caused me to bump into this issue, but I think this is an inelegant solution.

Permissions dialogs no longer block automation. That document describes the behavior under UIAutomation which has not been used since Xcode 7.

I have updated the wiki page.

@jmoody jmoody reopened this Nov 14, 2019
@jmoody
Copy link
Contributor

jmoody commented Nov 14, 2019

To help you understand what was happening under UIAutomation, here is some more context.

Calabash (the ruby client), asked UIAutomation (Apple tool) to launch your application for automation (testing). If your application generated a SpringBoard alert too soon, UIAutomation could not take control of your application. The same thing would happen if you used UIAutomation directly (not through Calabash). That is just how UIAutomation worked.

Now we use DeviceAgent (based on XCUITest) + xcodebuild to launch your application for automation. We have not observed that SpringBoard alerts can block DeviceAgent + xcodebuild automation.

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