How to goBack when using detox and IOS? - detox

According to the detox docs: https://github.com/wix/Detox/blob/master/docs/APIRef.DeviceObjectAPI.md
going back is Android only. What would be the recommended way of going back with IOS?

As with any interface element, you should set an identifier to the back button and then tap on it in your test.
The back function in Android simulates the physical back button, which is not available on iOS.

Related

how to manually force VoiceOver/TalkBack to speak in React Native

I am working on a React Native application which which uses slider components. These Slider components currently are not very accessible. When focused by a Screen Reader or Talkback the only thing that is read out loud is the accessibility label.
I would like to try and implement a slider that can behave like sliders in default iOS, where moving the slider will cause VoiceOver to constantly read out the value of the slider as it's being adjusted. Is it possible to trigger VoiceOver or Talkback directly in a function so I could implement something like this
So you're not using a native iOS UISlider or UIProgressView? You can announce notifications in Voiceover using UIAccessibilityPostNotification and pass it a string or an object.
Android usually uses a <SeekBar> for sliders. If not using those, then announcements can be made via android:accessibilityLiveRegion or announceForAccessibility

Get beacon button click (react native)

I need to use a beacon button as a panic button in a React Native application. So, I need to identify when the user clicks the beacon button. Is that possible? Is there any library that can help me with that?
Yes, if you have a clickable hardware beacon that turns on when you click on it, you can write an app so that it performs some "panic" procedure when that beacon is detected.
For ReactNative, try this package:
https://github.com/MacKentoch/react-native-beacons-manager

How do I change the color of the keyboard to dark mode for android in React Native?

I know that the keyboardAppearance" prop for TextInput sets an ios keyboard to dark mode, but how could I do this for android too? Any help is much appreciated. Thanks!
Unfortunately you can't do it on android.
In Android the keyboard is not (only) a native feature. You can chose wether showing it or not and which keyboard to show.
But since it's another application, you can't access it directly, the only tasks you can do are opening the app with intent.
However, the iOS, which is ironically more closed to OS tweaks, is available:

Appium iOS can't inspect notification layer

Im using Appium to test my notifications in my iOS app.
Im sending with another device a notification while the iOS app is in BG. Then I swipe down using :
((IOSDriver) wd).swipe(500,0,500,1000,1000);
The above works, the screen get scrolled down and I can physically see the notification. The issue is that the appium still inspects the screen below.
I checked appium inspector and it verified that it doesn't recognize nothing but the elemnts of the layer below the notifications one.
Any approach ??
As long as I know it is known limitation for iOS now.
You can get notification bar elements on Android only
But based on top comment it should be possible to wrap up with Appium since Xcode 9 introduced interaction with multiple apps, so its matter of time.
I found a workaround that fits my needs.
I found out that if I click the home button and then swipe down the notification are visible to Appium.
Because Appium not having key events for iOS, iPhone has the an accessibility option for home button, I toggled that on and I can simply click it during the test and swipe down the notification center.
I know it's not ideal but its working.
Thanks for the help.

Disable launch transition in WP 8.1 app

I wonder if it's possible delete the transition that leads to my WP8.1 universal app when it's launched. So, when my app is launched, I want it to just show the SplashScreen without any animation. I've already read this and this questions, but since I'm not navigating between pages within my app, I can't just set "ContentTransitions" of my frame to null.
Does anybody have any information on this? Or is it just not possible, since these "launching" transitions are managed by the OS?
Disable the animations on the Frame, hook up the Frame`s navigated event and enable them back after first navigation. I have a post about this here.
The initial splash screen is displayed by the OS until you call Window.Current.Activate(). You cannot disable/modify this transition, and you should also not try to do so as your app will lose parity with the rest of OS ecosystem.