Xamarin.UITest... How do I get the value of a Xamarin Forms CheckBox using Xamarin.UITest REPL (iOS)?

Sean Conlon 1 Reputation point

I have a UI test which attempts to check the state of a CheckBox. Whether it is checked or not.
On Android I have no problem. But on iOS I cant get it to work.

For a UISwitch I can use: app.Query(x => x.Marked("id").Invoke("isOn").Value<int>())[0]

But for CheckBoxes, it doesn't work. Any query returns "****".
I have tried invoking "isChecked' and a few other variations.
I have also tried casting to bool & string.

In the repl, the control is listed as: Xamarin_Forms_Platform_iOS_FormsCheckBox

All help is appreciated.

p.s. since there is no specific forum for ui tests, I have placed my question here... The tags are probably wrong too but I cant enter things like "UITest" & "iOS"

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
30,158 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 20,681 Reputation points Microsoft Vendor

    Hello @Sean Conlon ,

    Thank you for taking time to post this issue in Microsoft Q&A forum.

    According to your description, this issue is related to Xamarin.UITest, and it is belong to the Test Frameworks in App Center.

    As you know, questions about App Center are currently not supported in the Microsoft Q&A forums, the supported products are listed over here: https://learn.microsoft.com/en-us/answers/products/ (more to be added later on).

    You can get support for App Center and related questions directly from within the App Center portal. Please kindly check this document: Accessing App Center Free Support, and get more professional help over there.

    Thank you for your understanding.


    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments