Simulator architecture appears to be unsupported in ios simulator even after using the simulator build(.app) in appium - appium-ios

Simulator architecture appears to be unsupported by the '/Users/anakin/Downloads/MKETradeSIT 7.app' application. Make sure the correct deployment target has been selected for its compilation in Xcode.
Event 'appInstalled' logged at 1537497609020 (10:40:09 GMT+0800 (+08))
[JSONWP Proxy] Got response with status 200: {"value":"Failed to launch com.mayBank.MKETradeSIT application","sessionId":"956BB2D5-5E60-404B-BF82-592F1C655C5D","status":13}
[XCUITest] Failed to create WDA session. Retrying...
[BaseDriver] Event 'wdaSessionAttempted' logged at 1537497658840 (10:40:58 GMT+0800 (+08))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.mayBank.MKETradeSIT","arguments":[],"environment":

#Manish - You just confirm the given .app is supported on real iPhone device, if yes then it won't work on simulator, for simulator you need to get different build.
Generally in Xcode we can generate two different builds one for real device which is not run on iPhone simulator other one is simulator supported build which is not run on real devices

Related

When is sessionReachabilityDidChange(_:) called on a watch WCSessionDelegate?

Apple's documentation says this in the discussion section of the method description:
This method is called to let the
current process know that its counterpart session’s reachability
changed.
The description of the isReachable property says this: WatchKit
extension. The iOS device is within range, so communication can occur
and the WatchKit extension is running in the foreground, or is running
with a high priority in the background (for example, during a workout
session or when a complication is loading its initial timeline data).
I am assuming this would mean that if the watch moves out of or into range of the iOS device, the WatchKit extension would be launched and the WCSessionDelegate's sessionReachabilityDidChange() method would be called, and the WCSession's isReachable would be true if the iOS device just came into range and false if it just when out of range.
I have not found a way to verify this in xcode. For example I put a log message in sessionReachabilityDidChange(_:) and walked out of range, but xcode simply says the app lost connection with the iphone and can no longer debug it. Can someone verify this or point me to some documentation that better describes this?
I think you cannot verify this in Xcode.
I have an app on iOS and watchOS. To check this kind of situation, I can enable debug alerts on iOS and watchOS. When func sessionReachabilityDidChange(session: WCSession) is triggered, I display a debug alert.
Now, if I run (not under Xcode) my watch extension, and then switch off the paired iPhone, the debug alert is shown on the watch.
This shows that sessionReachabilityDidChange is actually called as expected.
Apparently, under Xcode a connected iOS device is always reachable.
EDIT:
To check the situation when the watch extension is not in foreground, I did the following:
Instead of showing a debug alert, I set now the complication to a unique value that is not possible otherwise. I launched the watch extension and put it into background by showing the watch face with the complication.
When I now switch off the iPhone, the complication is not updated.
This indicates to me that sessionReachabilityDidChange is not called in background.

Executing Robotscripts on Mac Safari browser is strange

I developed a Testsuite with 2 testcases one with valid scenario and other with invalid scenario.
Testcase1
Teststeps:
Launch url
Login with valid credentials(used locators xpath=ID for username and password)
perform some clicks and do some verifications
Logout
close browser
Testcase2
TestSteps:
Launch url
Login with invalid password(used locators xpath=ID)
verify the error message
Close browser
When i execute this Testsuite on Windows and test run on Chrome / Firefox both the testcases run successfully.
But when i run on Mac Safari only the first testcase(either 1 or 2) gets executed and other testcase fails. Don't understand the reason. I tried sych up scripts to application. But don't understand the underlying reason.
Appreciate if someone could help here or seen such scenario? Testcase fails because of invalid xpath/ or element not found
On same Mac Chrome both the testcases(1 and 2) run without interruption.

Unable to run test on real device but running on simulator

As I am new to real-time device testing, I need your support in resolving an issue which I am facing since long now. I have following issues with iOS devices and simulators:
I am able to run my script in the simulator but not on the real-time device.
Unable to see WebDriverAgentRunner app on the device, however, I have built that app multiple times.
My Scrip is able to interact with Appium, it gets installed also but never gets open (In Eclipse it gets failed with error: No element found)
Please find the attached appium logs and desired capabilities below:
Desired Capabilities:
IOSDriver wd = null;
DesiredCapabilities capabilities = new DesiredCapabilities();
System.out.println(" ");
capabilities.setCapability("appium-version", "1.7.2");
capabilities.setCapability("automationName", "XCUITest");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("udid", “UDID”); //6Plus
//capabilities.setCapability("noReset", "true");
capabilities.setCapability("platformVersion", "11.2.6");
capabilities.setCapability("deviceName", "iPhone 6”);
capabilities.setCapability("app",
“<Path of builded Application.app>”);
capabilities.setCapability("bundleID", “<com.bundel id>”);
wd = new IOSDriver(new URL("http://0.0.0.0:4723/wd/hub"),
capabilities);
Also in the simulator, I am able to run only on one device.
Appium Logs Are present in this link

Appium with WD and Mocha testing - Element is not currently interactable and may not be manipulated (status: 12)

The Problem:
Android Emulator
Tests work perfectly.
iOS Emulator
The test in question is verifying form validations on an ionic hybrid application. After initial form interaction on the emulator the following tests all fail as they are unable to utilize clear() or sendKeys() commands; the below error is thrown.
Error: [element.sendKeys("firstName")] Error response status: 13, UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Error while executing atom: Element is not currently inter-actable and may not be manipulated (status: 12)
Adding delay times between tests has no effect, changing the order of the tests results in the first one passing and the rest failing. Putting the tests in different test files results in them all passing. Any suggestions much appreciated!!
Manually
Interfacing with the app manually in the emulator the form inputs are all active after responding to an input validation and I am able to submit the form a second time.
Environment
Appium version: 1.72
Desktop OS/version : MAC OS High Sierra 10.13.3
Node.js version: 6.10.3
platform/version under test: iOS 10.3
My Code
Test Code
Appium Logs
Was able to get it working through the use of the retries method provided by the Mocha framework, not sure this is the most effective solution though.
https://github.com/appium/appium/issues/10256
describe('XYZ SCREEN: xyz.test.js', function() {
this.retries(30);
it('Should do something', async function() {
await test code ...
});
});

How to handle Alert windows in Amazon Device Farm /w Appium

I currently trying out Amazon Device Farm and was able to get a dummy app to work.
However, when I tried getting the actual App I want to get working on Amazon device farm, I'm unable to do so. I'm able to upload the .ipa file, and zip up and upload the py.tests/appium tests with their dependencies, however the tests fail.
What I think might be happening is ADF is not recognizing some of the Desired_capabilities to autodismiss the Alerts for Notifications and GPS coordinates.
My setup is very similar to the setup I used with the dummy app in my initial tests. (these worked with amazon device farm)
https://github.com/dlai0001/appium-spike-running-tests-oncloud
Only thing that is really different is I'm using a real production app, where 2 alert windows popup upon launch. In Appium it will cause the test to crash if I don't have the autodismiss or autoaccept alerts enabled in the desired capabilities.
Harness 00:00.0 1295 Info Starting 00001 with device c00e8ab68437161b894395e438ba8935a672bac0
Harness 00:00.0 1295 Info Using test content version 0.1.0
Harness 00:00.1v1295 Info Using image version ami-778b7c17
I work for the Amazon Device Farm team.
It appears that you are relying on desired capabilities to dismiss the alert window. Currently, Device farm has support for a very limited set of desired capabilities namely app name, package name and osversion. These are available to the application without having the user required to set it.
Appium runs with autoAcceptAlerts=true on Device Farm. This should handle the alert windows, if any, unless it is a system pop up which autoAcceptAlert cannot handle. You should check if your tests can handle the alert windows using autoAcceptAlerts=true with Appium pre launch mode locally.
If it can handle it then device farm should behave the same way.
Sometimes it may be the case that the alert window appears before the appium session is established in which case adding a delay can help.
When you test is locally please use Appium version 1.4.16 since this is the version being used on device farm right now.

Resources