uiautomatorviewer - does not show WebView content when using Emulator - android-uiautomator

When I use uiautomatorviewer to dump some structure on Emulator the last element showed is android.webkit.WebView. This is actually different than real device where i have no problems detecting objects on native view. Since i am automating tests with appium this may be a problem and will force to change context. Device API = 22(Android 5.1)
Is this fault in uiautomatorviewer or some settings can be applied?

Related

UI Automation for AppleTV system using XCode

Is UI automation available for the main menu of the Apple TV and not a specific application? I already setup the whole UI testing thing using XCode and tried using the remote control but it is only available for the application that was defined using XCUIApplication.
So is it possible to control the whole system rather than a specific application? I was thinking of something similar to pyatv but using XCode since I might be able to get more information concerning the current focused apps and so on.
There is an API XCUIApplication(bundleIdentifier: ) to interact with not-AUT apps. You need to substitute the right identifier for this Springboard-like interface. Maybe it is a Headboard, but I'm not sure.
Bundle identifiers of tvOS apps https://github.com/rzakhar/XCTApps/blob/master/Sources/XCTApps/tvOS.swift

How to debug when using Google VR (Daydream) and Unity?

I'm using the latest Google VR SDK and Unity 5.6. I've got a Daydream headset/controller and I'm trying to develop a game. I've been stuck on a problem for a while now, which in a typical Unity environment I should be able to solve very quickly, but because I'm forced to build/run the code to the device each time I want to test I'm unable to view the console nor see any error/warnings which are thrown.
Any idea on how I can debug using Unity, or even emulate the Daydream controller/headset within Unity? I've seen that a controller emulator exists, but it appears you still have to run on the device, only in that scenario you have to have two phones; one acting as the controller and another as the 'screen'.
Thanks
Check out this asset Log Viewer.
Using this asset you can see the same log console in Unity Editor in runtime. I don't know about DayDream but it worked for me on Android, Oculus, and GearVR.

Xamarin - create an environment to view HTML files

I have only written PC programs using C#, .NET, and WinForms, and am new to app development.
I have written a program that uses HTML files (as a type of "form"), that will then be passed to an app, which can then be used to read/record data. I.e.
On the PC, a user creates a HTML "form"
This is loaded onto a mobile device (phone or tablet)
The user can then open the app, and access each individual (or individual copies) a HTML form to read/record data.
This is then transferred back to the PC, and stored.
Now, I'm not too concerned with the transfer between the PC/device, or the storage of the data, or any of that at this point. What I am concerned about is the ability to open/view these HTML files within a single app.
As the program has already been written using .NET and WinForms, it needs to be converted to be used on a mobile device, and I have chosen Xamarin for this purpose. However I only have limited knowledge of this package, so I am not sure if I can achieve this within a single app (i.e. without having to pass it to a separate app to view the HTML files).
So: is there an environment in Xamarin that I can use to view HTML files within my app?
Xamarin.Forms has a WebView class that you can use to display HTML content, so viewing the content is rarely an issue.
Interacting with the HTML content can sometimes be a bit tricky because of the links not conforming to what the app expects. But you can often solve these issues using the WebView.Navigating event handler that will allow you to catch and change the navigation behavior.
Xamarin.Forms's WebView relies on the native UIWebView (iOS) and WebView (Android) and Xamarin.Forms allows you to override the native Renderers. Overriding the native renderer will give you access to the native WebView with full flexibility.
You also have the possibility to completely ignore Xamarin.Forms's WebView and write your own view using native views.
It would probably be smart to test your WinForms app on iOS using Safari and on Android using Chrome as they are using the same rendering engines that will be used in respectively UIWebView (iOS) and WebView (Android)

Does Xamarin support to develop apps for Windows surface and how well?

I want to develop an app for Windows surface tablet and iOS mobile and iPad.
As I am a new user to Xamarin, when I created my first project,it shows 3 projects:-
hello.driod, hello.ios and hello.winPhone.
I have 3 questions based on this:-
How will I be able to write the same code and share for windows 8.1 and iOS?
and whenever I drag and drop the elements to the UI page, will the same elements be copied to both windows and iOS simultaneously or I got to add them seperately?
Currently I dont have a MAC to connect to my PC. Can I write the code and and there while testing it, connect it to a MAC or should it be connected during the whole process?
Please Help!
Using the same code depends on how your structure your app.
You can go the native route where you can share the bulk of your logic by containing it in a shared / PCL project (more on that here), but have platform specific code for your UI.
For example, if you have a cross platform app targeting iOS and Android you would still create the UI in a storyboard for iOS and AXML files for Android. Any code you want to "connect" to your UI would be specific to that platform as you would use the platform APIs. Any code that is not platform specific (i.e., not calling iOS or Android APIs) can go in your shared / PCL project.
Or you can choose Xamarin.Forms which adds a layer of abstraction by allowing you to write the UI in XAML once and have it work on all platforms. The advantage is increased code sharing as now your UI is also shared. The downside is to utilise platform specific features you'll need to implement DependencyService or custom renderers. Read more about Xamarin.Forms here.
As above, it depends. If you are going the native route, then no. If you are going with Xamarin.Forms, then you are using the same XAML code for the UI across platforms, but there is no drag and drop designer.
To build an iOS app you need to be connected to a Mac. You will also need to be connected to a Mac to use the iOS Designer.

Implementing error logging in windows phone 7 app? [duplicate]

I don't have a WP7 device yet. Everything is functional in My App on a Simulator, but when my customer test it, app does not function at all. e.g. VDO is not playing.
Is there a way to get a crash log from Windows Phone 7? (like iPhone).
You can easily create your own crash report. Basically this is what you have to do:
In your App class add an handler for the UnhandledException event
inside the handler prepare a log with everything you need (stacktrace, memory allocated, etc.)
use an email composer Task to send the report.
You can also check BugSense which is a cross-platform(iPhone,Android and Windows Phone) tool that collects and analyzes crash reports from mobile apps.
Disclaimer: I have developed the WP7 plugin.

Resources