Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Issue with app.EnterText for Android API 29 ONLY Xamarin.UITest

MoshexMoshex Member ✭✭
edited December 2019 in Xamarin.Android

I have been having an issue with Xamarin.UITest after the application that I am working on was updated to the latest android version (API 29). This issue did not happen before the application updates and automation worked as intended on API 29. Before the application was updated and you did a fresh install the application would have an "OS" prompt stating that the "Application was out of Date" once the application was updated that prompt no longer displayed however the Xamarin.UITest issues appeared.

The issue is that when automation runs on a device with API 29 ONLY and when the code app.EnterText runs the text that was requested via code to be inputted does not get input. The same applies to app.ClearText, once the command is done the text in the field does not get cleared. its as if there is a permission issue with the automation interacting with the application text fields only. Note, the test does not fail with an error and the test keeps running like it did the commend, which makes it header to know why it's doing this.

I did work with my DEV's to see if this is an application issue and his theory is that it's a permission issue but we are both not sure where the issue is of what permission is being blocked any help of shedding light would be very helpful.

Environment replication that I am seeing the issues on:
Device/OS: Pixel 3 XL (real device)/ Android version 10(API 29)
Xamarin.UITest version: 3.0.4

Rinning the latest updates for packages including Xamrin.Forms and the application is configured for API(29)
Note: the text fields work just fine outside of automation and if a user inputs the text it works as intended, just an Automation issue

VS/Xcode version:
Visual Studio Enterprise 2019 for Mac
Version 8.3.10 (build 2)
Installation UUID: 87bfc8d6-bb7e-4416-8725-c451ad424835
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac (d16-3 / 08809f5b)

Package version: 604000208

Mono Framework MDK
Mono (2019-06/07c23f2ca43) (64-bit)
Package version: 604000208


SDK: /usr/local/share/dotnet/sdk/3.0.100/Sdks
SDK Versions:
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin/Sdks

.NET Core Runtime
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:

Location: /Applications/Xamarin Profiler

Version: 11

Apple Developer Tools
Xcode 11.2.1 (15526.1)
Build 11B500

Xamarin Designer
Hash: 8a223bfd7
Branch: remotes/origin/d16-3
Build date: 2019-11-01 21:02:02 UTC

Version: (Visual Studio Enterprise)
Hash: e3c2b406d
Branch: xcode11.2
Build date: 2019-11-01 00:12:07-0400

Version: (Visual Studio Enterprise)
Hash: e3c2b406d
Branch: xcode11.2
Build date: 2019-11-01 00:12:08-0400

Version: (Visual Studio Enterprise)
Commit: xamarin-android/d16-3/c407838
Android SDK: /Users/{*}/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.5
SDK Build Tools Version: 28.0.3

Build Information:
Mono: mono/mono/[email protected]
Java.Interop: xamarin/java.interop/[email protected]
LibZipSharp: grendello/LibZipSharp/[email protected]
LibZip: nih-at/libzip/[email protected]
ProGuard: xamarin/proguard/[email protected]
SQLite: xamarin/sqlite/[email protected]
Xamarin.Android Tools: xamarin/xamarin-android-tools/[email protected]

Microsoft Mobile OpenJDK
Java SDK: /Users/mmoadeb/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
Android Designer EPL code available here:

Android SDK Manager
Hash: c33b107
Branch: remotes/origin/d16-3
Build date: 2019-11-19 20:33:22 UTC

Android Device Manager
Hash: d2b2af0
Branch: remotes/origin/d16-3
Build date: 2019-11-19 20:33:42 UTC

Xamarin Inspector
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

Build Information
Release ID: 803100002
Git revision: add3a4998a5cb5b081e0404e1fe13acfecb7801d
Build date: 2019-11-20 13:35:15+00
Build branch: release-8.3
Xamarin extensions: 79c69708816813b498283eeda7bcb4d464433a04

Operating System
Mac OS X 10.15.1
Darwin 19.0.0 Darwin Kernel Version 19.0.0
Thu Oct 17 16:17:15 PDT 2019
root:xnu-6153.41.3~29/RELEASE_X86_64 x86_64

Enabled user installed extensions
Straight8's SpecFlow Integration
XAML Styler 1.1.5

The only error that I see when debugging the test is below, I am not sure if this has any relevance:

[0x7000100bc000] The instruction pointer of the currently executing method(Xamarin.UITest.Queries.AppQuery:tokensFromObjectArray (object[])) is not on the recorded stack. This is likely due to a runtime bug. The 15 frames are as follow:
[0x7000100bc000] Frame (0 / 15): (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo:InternalInvoke (System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
[0x7000100bc000] Frame (1 / 15): System.Reflection.RuntimeMethodInfo:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
[0x7000100bc000] Frame (2 / 15): System.Reflection.MethodBase:Invoke (object,object[])
[0x7000100bc000] Frame (3 / 15): System.Delegate:DynamicInvokeImpl (object[])
[0x7000100bc000] Frame (4 / 15): System.MulticastDelegate:DynamicInvokeImpl (object[])
[0x7000100bc000] Frame (5 / 15): System.Delegate:DynamicInvoke (object[])
[0x7000100bc000] Frame (6 / 15): TechTalk.SpecFlow.Bindings.BindingInvoker:InvokeBinding (TechTalk.SpecFlow.Bindings.IBinding,TechTalk.SpecFlow.Infrastructure.IContextManager,object[],TechTalk.SpecFlow.Tracing.ITestTracer,System.TimeSpan&)
[0x7000100bc000] Frame (7 / 15): TechTalk.SpecFlow.Infrastructure.TestExecutionEngine:ExecuteStepMatch (TechTalk.SpecFlow.Bindings.BindingMatch,object[])
[0x7000100bc000] Frame (8 / 15): TechTalk.SpecFlow.Infrastructure.TestExecutionEngine:ExecuteStep (TechTalk.SpecFlow.Infrastructure.IContextManager,TechTalk.SpecFlow.Bindings.StepInstance)
[0x7000100bc000] Frame (9 / 15): TechTalk.SpecFlow.Infrastructure.TestExecutionEngine:Step (TechTalk.SpecFlow.Bindings.StepDefinitionKeyword,string,string,string,TechTalk.SpecFlow.Table)
[0x7000100bc000] Frame (10 / 15): TechTalk.SpecFlow.TestRunner:When (string,string,TechTalk.SpecFlow.Table,string)
[0x7000100bc000] Frame (11 / 15): TechTalk.SpecFlow.Steps:When (string,string,TechTalk.SpecFlow.Table)
[0x7000100bc000] Frame (12 / 15): TechTalk.SpecFlow.Steps:When (string)
[0x7000100bc000] Frame (13 / 15): WellRx.UITests.Steps.DashboardSteps:GivenIAmOnTheHomePage ()
[0x7000100bc000] Frame (14 / 15): (wrapper dynamic-method) object:lambda_method (System.Runtime.CompilerServices.Closure,TechTalk.SpecFlow.Infrastructure.IContextManager)


Sign In or Register to comment.