Appium iOS can't go to Home screen - ios

Im using Appium to test my iOS app on real device.
During the test I need to go to the home screen (I must do so) but can't find a way to do it.
I found here that there is an option to use the accessibility for Home button-
Appium iOS can't inspect notification layer
but how can I click on this? Appium doesn't recognized this button.
Any suggestions?

Using Appium Java client you can switch to Home screen on iOS the same way as on Android:
driver.runAppInBackground(Duration.ofSeconds(-1));

You should run:
driver.executeScript("mobile: pressButton", ImmutableMap.of("name", "home"));
Look at this post.

Related

How to close individual React Native emulator?

I'm running my app on a React Native emulator. I was originally emulating just the iPhone 6, and then added an iPhone 6 Plus emulator. When you add a second emulator it keeps the first one open. How do you close one of them while keeping the other open? Basically I want to de-select one of the emulators shown in the photo below:
Thanks!
Xcode device's emulator behaves like any other window, so you just have to Cmd+W on the one you want to close, it's like closing just one window of any other application.
And if you want to know more about Mac keyboard shortcuts, here's a link!

Disable Debugging in Expo For React Native App

So I've opened up my react-native app in Expo today (using the iOS simulator) and I am creating by what looks like a debugging overlay.
Screenshot here:
I don't need this and it's blocking some of the UI for testing.
How does one turn it off?
You have the Element Inspector open. To toggle it off do either:
⌘+D if you are in the simulator
Shake your phone if you are on an actual device
This should open up the debugging menu. You can then click on Toggle Element Inspector to close it.

App Elements are displayed way off in Appium Inspector

I am having issues with an IOS app we are using with Appium. The elements appear on the wrong part of the UI. See Image.
Anybody run into this issue? Maybe we need to build the app differently? I ran a test script, and the elements receive proper taps and interactions. It's just in Inspector they show off.
There is nothing to change in the development of an app. This is just the inspector problem. If you try and use "UI automator" everything works fine.

How can I disable autocorrect in iOS 8 simulator at run time?

I am automating functional tests in the iOS 8 simulator with Appium (Selenium Driver). Unfortunately, when I attempt to enter text into a text field on a login screen, the sim automatically corrects my text causing a login failure. How can I disable autocorrect at run-time?
This program resets the simulator after each test, so any changes to the device settings would be wiped. I would prefer to not have to modify the app itself and I need to use iOS 8 (iOS 7 works).
Can you tell me if there is another way to set this capability in Appium or through Instruments? Or, perhaps another way to send text with Selenium?
With open xcode you go on the storyboard. Do not select any view or table. Click on white. In the right corner you will in the first option and clear the "Use auto layout." Ready!

How can I see the source of a webpage as it would be displayed on an iPhone?

I don't have an iphone, but I want to see what the HTML looks like to my users using an iphone.
Is there a way to emulate an iphone, so that flash does not appear ? For example if I visit YouTube, I don't want to see the Flash player in an emulator.
Thanks
Download Xcode for free if you have a mac and you can use the iphone simulator bundled with it. See this link on How to run iPhone emulator without opening Xcode
try safari browser. select Develop, User Agent, iPhone (or iPad or iPod Touch) from that menu.
if the Developp menu is not found then, Show Develop menu in menu bar in the Advanced Preferences

Resources