UITest - app.EnterText not working on WebView - Element is selected but text is not entered


I am having an issue with the a UITest where I need to enter text into a textbox on a webview. The textbox gets selected, then the test waits for a few seconds but the text never enters.

REPL output is attached showing the test i am running and output from tree.

Am I missing something else here??


Best Answer


  • WilliamWattersonWilliamWatterson USUniversity ✭✭

    Just ran the above test in TestCloud and it works there on three different devices.
    Tried it on some physical 3 devices here and it works on 1 of them...

  • josemmortegajosemmortega ESUniversity ✭✭✭

    @WilliamWatterson it's a supposition, I see you access to text by css id.

    Can be, this devices, browser don't recognize the tag. Can you try open for html id or other way, or check if css code inside device appear this.

  • WilliamWattersonWilliamWatterson USUniversity ✭✭

    @josemmortega, thanks for your reply.

    Im not sure what you mean? As far as i know you can use the .Css selector for items inside a WebView? When you say try open for "html id or other way" how would i go about doing that?

  • josemmortegajosemmortega ESUniversity ✭✭✭

    @WilliamWatterson I see, I mean, maybe in this devices css id don't appear in webview. Other thing that happen with devices it's softkeyboard. If softkeyboard hide the control, you can select, take care with that.

    Also, if you testing webview, maybe better doing this test with Selenium or another UITesting framework for web

  • BenBatesBenBates GBUniversity ✭✭

    I'm having exactly the same issue when testing on a physical device, after updatign to UITest 2.0.0. It worked when I was using UITest 1.3 but I was seeing failures when running in TestCloud, so updated to 2.0.0. Seem to have taken a step in the wrong direction though :-1:

  • WilliamWattersonWilliamWatterson USUniversity ✭✭

    @BenBates I have logged a ticket with Xamarin support so hopefully will get a response. V strange problem though

  • BenBatesBenBates GBUniversity ✭✭

    @WilliamWatterson Very strange indeed. Kinda renders it a little useless for any app that requires Text Input. I've only tried it on Android so far. Let me know what they come back with.

  • WilliamWattersonWilliamWatterson USUniversity ✭✭

    @BenBates, I think I found something....

    I went to Settings -> Applications -> Application Manager -> Android System Web View. The versions on the devices that didnt work were > 54, but on the device that worked it was 49.

    So I tapped on the three dots at the top and selected "Uninstall Updates" and it works now!

  • BenBatesBenBates GBUniversity ✭✭

    @WilliamWatterson Thanks William, that's very interesting. I'll check that out on my test devices. Just need it fixing up so it works in Xamarin Test Cloud now, which I suspect will take a while. It's kinda useless to me without being able to run on many devices in XTC. Thanks again for sharing!

  • MatthewMizziMatthewMizzi FRMember ✭✭
    edited November 2016

    Hi all, I can confirm that this "hack" worked on my devices aswell.

  • WilliamWattersonWilliamWatterson USUniversity ✭✭

    Xamarin Support replied with this:

    "UITest Android uses some shared components with calabash-android). After it is fixed in calabash-android it should show up in UITest soon after."

    So looks like they intend to fix it soon.

  • MatthewMizziMatthewMizzi FRMember ✭✭

    @WilliamWatterson thanks for this update

  • pcSagarpcSagar INMember

    I'm having same issue with the EditText when testing on a physical device for only Android Nougat. Same has been confirmed on cloud as well in device with Nougat os. So far no solution, Xamarin.UITest version is

  • MattiasEdmanMattiasEdman USMember ✭✭

    I still got this issue with UITest nuget 2.0.5 for Android.

    Samsung S7, HTC 10, Oneplus 2, Samsung Galaxy S5, Sony Experia XZ.....

    Any updates how to solve this issue?

  • JonWhiteJonWhite USMember ✭✭

    Did anyone ever find a solution to this issue? I'm still running into it with UITest version 2.0.9 in iOS.

  • Y2KY2K USMember

    I am having this issue too. Could Microsoft expert update on this?


Sign In or Register to comment.