You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working a POC with WPF application and trying to properties of checkbox control to check checkbox is checked or not and take a required action further. below is code where I am trying to other property of checkbox at runtime.
WindowsElement cellObj = session.FindElementByAccessibilityId("Checkbox");
if (cellObj.GetAttribute("Toggle.ToggleState:").Contains("Off"))
{
cellObj.Click();
}
In the above code , trying to get a attribute Toggle state or LegacyIAccessible.State: and see what is the state of checkbox. But this returns NULL all the time and for other attribute of checkbox as well.
Is there something that I am doing wrong . Any suggestion welcome. :)
Or
Is This something WinAppDriver lacks as of now and any enhancements in next release?
regards,
Mahi
The text was updated successfully, but these errors were encountered:
In UWP app a CheckBox UI control Selected property returns true when it is checked and false otherwise. E.g.
var originalState = checkBoxElement1.Selected;
checkBoxElement1.Click(); // Toggling the state
Assert.AreNotEqual(originalState, checkBoxElement1.Selected);
checkBoxElement1.Click(); // Toggling the state
Assert.AreEqual(originalState, checkBoxElement1.Selected);
I want to know the disable checkbox is checked or not but i am not getting the value either it is checked or not. i have used (LegacyIAccessible.State:) and Toggle.ToggleState it is showing always false what is the reason? my checkbox is actually disabled and we cannot checked or unchecked.
Hi,
I am working a POC with WPF application and trying to properties of checkbox control to check checkbox is checked or not and take a required action further. below is code where I am trying to other property of checkbox at runtime.
WindowsElement cellObj = session.FindElementByAccessibilityId("Checkbox");
if (cellObj.GetAttribute("Toggle.ToggleState:").Contains("Off"))
{
cellObj.Click();
}
In the above code , trying to get a attribute Toggle state or LegacyIAccessible.State: and see what is the state of checkbox. But this returns NULL all the time and for other attribute of checkbox as well.
Is there something that I am doing wrong . Any suggestion welcome. :)
Or
Is This something WinAppDriver lacks as of now and any enhancements in next release?
regards,
Mahi
The text was updated successfully, but these errors were encountered: