New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not get or set value of Spinner inputs #45
Comments
It seems that it is broken in UIA2. In UIA3, I can get the edit correctly and get/set values (Windows 10). I'll investigate a bit more but more but I guess there is nothing we can do. |
UIA3 works, a note to users using powershell remember to shutdown powershell ISE completely when switching form UIA2 to UIA3. A process that was using UIA2 can not use UIA3. (unless separate app domains are used?) |
var spinner = App.GetMainWindow(Automation).FindFirstDescendant(cf => cf.ByAutomationId("numericUpDown1"));
Assert.IsNotNull(spinner);
var edit = spinner.FindFirstDescendant(cf => cf.ByControlType(ControlType.Edit)).AsTextBox();
Assert.IsNotNull(edit);
edit.Text = "42";
Assert.AreEqual("42", edit.Text); |
You don't get min/max and such with that but at least the value. |
Problem was that UIA2 was loaded into the process already and then UIA3 was loaded (which then still worked on UIA2). So getting/setting the value works with UIA3. |
FlaUI appears to be unable of getting or setting the value of a numeric spinner control in a windows forms application.
In UIA2 note that the edit control inside of the combo-box does not show up:
In UIA3 it shows up in the inspect tool:
However, the edit control which contains the value does not seem to be target-able by code
branch with spinner on win forms app
My attempts to select the current value:
The text was updated successfully, but these errors were encountered: