How does one access the current SceneDelegate from a XCUIApplication object? - swift

I went through the official documentation and the autocomplete options in Xcode but couldn't find anything.

UI Tests are not supposed to provide you application code access. You test them as a user would (black box testing).
On current screen,
find a button with label "Get Started"
Tap on it
Swipe Up etc.
You would exercise the app as a user would use it, tap on A, wait for B to appear on screen etc.

Related

iTunes U style download/progress/stop/play button

iTunes U for the iPhone has these wonderful buttons that show
the download progress
the stop button and the
play button (well, the "i" button)
in one place - see attached screenshot. Is this a system icon which can be called by code, or is it something thats not available for developers?
Anyhow: if someone has a source, that describes how to get such kind of buttons, I'd be very happy. It's clear to me, that the icons are controlled by a state-pattern in view-controller.
Thanks in advance.
There is DACircularProgress on github, it looks just like the circular progress bar on the Facebook app, I think you can take that, modify it to put the stop button on top and change the color and use it. check it out:
DACircularProgress

Instruments UI Automation tests for iPhone app

I'm a newbie in UI Automation using instruments and I have the following question:
- the application starts and I get the mainWindow screen (which contains SignIn and Register buttons)
- I've managed to write the JavaScript code in order to tap one of the two buttons.
-> after tapping one of the buttons, another screen is displayed. let's say the Sign In screen which contains two fields: username and password.
In this case, how can I tell Instruments that this is another screen and this contains another elements that should be retrieved in order to fill the fields and tap the Sign In button ?
I only know to retrieve the mainWindow. I don't know how to write the code for a next screen
Did you try to capture what you do with the small record button in the Javascript editor window? That way you can find out how Instruments can call the elements you use.
See also this thread:
UI Automation - how to capture - record using javascript editor

iPhone and iPad wordpress menu BAD behavior

On this site : mecanomedic.com, the menu template work fine in "normal" desktop browser, but dont slide down on ipad-iphone device. What can be the problem ?
Some tell me it's a css problem, but HOW safari desktop work ?
The problem is that the menu expansion relies on the user hovering with a mouse. On touch devices like iPads & iPhones, the hovering gesture can't be replicated because there's only one input- touch. If I were you, I'd take a look at Twitter's Bootstrap menu setup and perhaps use media queries to serve up a different menu on smaller screen sizes.
Here's an example of a Bootstrap navigation bar in action (you'll have to inspect the code to see how it works).
Add a href to the top-level <a>'s so that they can be focusable:
Produits
Elements that are focusable receive mouse events and hover styles when the user taps on them.
As #Matt stated, the problem is that your menu relies on a hover event and unfortunately that event is unavailable on touch screen devices.
One way to fix this would be to:
Check if the current user's device is an iOS device
If the device is an iOS device, use javascript to trigger a menu item's "show event" when the menu button is CLICKED instead of ROLLED OVER / HOVERED.
This would result in the menu being shown when the user taps a menu button.

Any iOS UI control similar to the volume change popup?

I'd like to notify my users when something like a request failure occurs. However, I don't want to interrupt the user by using a popup style alert. I'm looking for something like when you change the volume on the device and that translucent icon pops up and fades away after a second or two. During the time the icon is showing, the user can still interact with the app as if it weren't there.
I looked in the HIG, but I couldn't find any such UI control that is native to iOS. Are there any good open source controls that do this?
There's an excellent control for a HUD-style popup called SVStatusHUD. I belive it does exactly what you're looking for:

iPhone UI Design: Okay button or no okay button

I am compulsive and like visually clean designs.
Theres a pop up in my app that tells the user that there's an error.
I made a clear button over the entire pop up (about 200x100 px) so the user can just touch the notification to dismiss it.
But i'm afraid the user might not know that you can just touch the pop up to dissmiss and would go crazy looking for the "OKAY" button.
Do you guys think the OKAY button is necessary or is a giant clear button overlaying the notification good enough?
note: the whole notification actually looks like a button because of rounded corners and some button like borders.
Whatever users can misinterpret, they will (just look at some of the low ranked App store reviews for examples).
So, unless it clutters your UI and/or makes things even more confusing, a clear indication of how get rid of or move beyond your popup will certainly reduce the chances for any user confusion.
I like the idea of your design, but I would go for an OK button. There might be people in the world who don't understand it and blame your app.
Or you leave out the button and make the notification disappear by itself after, say 5 secs.
Or you could go the Microsoft way:
- add the "Okay" button
- add a smaller checkbox with the caption "don't ask me again"
- when the okay button is clicked and the checkbox is marked, open an additional dialog notifying the user that the Okay button will no longer be displayed, but that they can clear that setting in the preferences menu
- create the preferences menu as described
Now who says Microsoft suck at UI ?
You should use the OK button. Not only will it be more familiar for users, but you won't have any problem with Apple's approval process. Depending on the reviewer they might reject the app for not conforming to the Human Interface Guidelines.