I have a winforms application. I installed the latest stable Appium version through NuGet.
I simply want to enter an emoji into a text field
using OpenQA.Selenium.Appium.Android;
using OpenQA.Selenium.Appium.Enums;
using OpenQA.Selenium.Appium;
using System.Windows.Forms;
using System;
var appiumOptions = new AppiumOptions();
appiumOptions.AddAdditionalCapability(MobileCapabilityType.PlatformName, "Android");
appiumOptions.AddAdditionalCapability(MobileCapabilityType.DeviceName, "1234");
appiumOptions.AddAdditionalCapability(MobileCapabilityType.AutomationName, "UiAutomator2");
var driver = new AndroidDriver<AndroidElement>(new Uri("http://127.0.0.1:4723/wd/hub"), appiumOptions);
AndroidElement messageBox = driver.FindElementById("com.app:id/simple_text");
messageBox.SendKeys("");
But the output is always "��" instead.
If I use the Appium Session Manager to set the field, it works flawlessly.
I strangely noticed in the Appium Window that for my C# program, this appears:
[HTTP] {"text":"","value":["�","�"]}
But for the Appium Session Manager, it looks like this
[HTTP] {"value":[""],"text":""}
It works correctly when using Selenium WebDriver instead of Appium but this is not an optimal solution.
Are there any ways to fix this?