Appium WebView always rendered as NATIVE_APP (iOS and Android / Xamarin) - xamarin

I am testing an iOS and Android Xamarin application using the Appium desktop tool (and therefore language agnostic). The application, when attempting to sign in, loads a webview. However, on both iOS and Android applications, Appium still sees the context as NATIVE_APP. I tried following the instructions here in case there was an issue with Appium desktop, but I got an array containing only NATIVE_APP when calling #driver.available_contexts (Ruby), so I don't believe that's the issue. I AM able to inspect the login page using Safari / Develop / Simulator, so I am unsure who Appium can't see the webview. Any help would be appreciated.
Note - I have another native application that uses the same login intercept webview, and appium DOES see the Webview. So it's entirely possible that this is related to Xamarin. But I have no way of knowing for certain

Can you check the below setup according to appium docs for android.
There is an additional step necessary within your app build, unfortunately. As described in the Android remote debugging docs it is necessary to set to true the setWebContentsDebuggingEnabled property on the android.webkit.WebView element.

Related

Users Complain that Xamarin Android App Freezes

I have a Xamarin.Forms Android app on the Google Play store. An overwhelming amount of users are leaving 1 star app reviews of my app saying that the app is "Freezing." They say that nothing happens when they click on a button in the apps UI. I have made doubly sure that no processes are running on the UI Thread that might hold up the UI. I have not been able to recreate this "Freezing" behavior personally. There are also no crash or ANR reports in the Google Play Console (at least not enough to make up for the amount of negative reviews I'm receiving). Has anyone else faced this problem?
Useful Info:
Xamarin.Forms Version: 4.8.0.1560
There is no discrimination between the Freezing behavior and users' Android API Version
The issue is not happening (or is not being reported) on the iOS app.
Do you have a physical Android device to deploy to? Take the apk and side load it, or download from the store, don't use VS to deploy the app on your device.
I had a similar issue and it was the code shrinker in VS. The released version with the code shrinker enabled, caused the app to freeze immediately after the splash screen.
You can disable it by selecting 'nothing' in the code shrinker box in VS.

Xcode iOs Simulator - native websites check before going online

I am downloading the Xcode from the app store to check how my websites will look on different devices. I know how to use the iOS simulator but for websites that are already online. Is there a way to check how a website looks like when i have it native on my mac? I mean when i am at the development stage of the website before put it online, is there a way to check it on the iOs simulator?
Thanks
The simulator contains a version of Safari that can access the outside world via your Mac's network connection. So you don't have to do anything — just type in the address as with any other browser.
You can also drag and drop local HTML content (or anything else the simulator's miniaturised suite of apps can handle) directly onto the simulator to preview without uploading anywhere.

JS not executed on Pebble Time with "notifyWithAppMessage: no delegate" in the app logs

I have a perfectly working (Pebble Classic) app on the Pebble app store. However, when installed on Pebble Time, the JS is not always executed (or takes too long to kick in) and in the logs I can see "[PHONE] pebble-app.js:?: notifyWithAppMessage: no delegate."
Is it Aplite compatibility issue or do I need to do something differently for Basalt platform. App is SDK2, thus compiled only for Aplite.
Note that the JS was not bundled in iOS app yet, so if you want to try it you must use Android app.
https://apps.getpebble.com/applications/5541de234b4d965adb000050
This should work. Please file a bug via the mobile app.

Is it possible to download browser in iphone simulator

I run my selenium tests across different web browsers like google chrome, firefox ie ect. These tests are being conducted in windows and Mac machine. We have requirement to run those tests in mobile browsers. I was able to run in mobile simulator safari browser successfully.
Now, I am wondering if it is possible to run those selenium tests in other browsers like opera mini but I was not able download opera mini browser in my simulator.
Can any one suggest me if it is possible to download browsers in simulators. I am using XCODE to build simulator.
No, you can't install apps into the iOS simulator except for an app you can actually build in Xcode.
Use a real iOS device to test using different browsers.
You could download and build the Chromium iOS browser in Xcode and run it in the iOS Simulator. It should be close to / in parity with the Chrome iOS browser, at least from a page rendering perspective (difference include things like Chrome's auto update feature, built-in PDF view, Chrome's custom print preview, etc. Mostly ancillary features to the core browsing experience.
Chromium (iOS) build instructions: https://chromium.googlesource.com/chromium/src/+/master/docs/ios/build_instructions.md
Firefox (iOS) build instructions:
https://github.com/mozilla-mobile/firefox-ios

How to install weinre on mac?

I wanted to debug my mobile web app that would be running on a mobile device or simulator (like iOS simulator). On googling a lot I came across Weinre but could not figure out how to install on my macbook.
I was able to comfortably install weinre following the instructions on page http://blog.joelambert.co.uk/2012/05/17/installing-weinre-on-mac-os-x/ .
After installation, I executed weinre command which started a server on http://localhost:8080. I typed the same on my desktop browser which gave me further instructions. It asked me to copy-paste a script tag (similar to <script src="http://localhost:8080/target/target-script-min.js#anonymous"></script>) into the page (http://myMobApp.local) that I was trying to remotely debug. I did that and opened the mobile app page on my iOS simulator. After it loaded in simulator I open the debug client user interface link (similar to http://localhost:8080/client/#anonymous) that was shown on the instructions page. It gave me a beautiful interface to debug the web app running on simulator.
Short update: though Goje87's answer is perfectly accurate, I want to point out that as of iOS 6, Apple has supercharged Safari's web inspector to be able to inspect HTML pages running within apps on iOS devices.
The advantage over Weinre is that you can even debug JS scripts (breakpoints, watches etc.).
Here's a guide on making this work: http://moduscreate.com/enable-remote-web-inspector-in-ios-6/
EDIT: You need a Mac for this.

Resources