How do I programmtically set the Id property for testing

I am trying to find out how to set the ID property for UITesting. I see it exists, but I can't find an Id property. Can I make one and it gets applied or is there a method to set it. You can see it exists here
{
"Id": null,
"Description": "; layer = >",
"Rect": {
"Width": 32.0,
"Height": 45.0,
"X": 2.0,
"Y": 269.0,
"CenterX": 18.0,
"CenterY": 291.5
},
"Label": null,
"Text": null,
"Class": "UIView",
"Enabled": true
},

Posts

  • nick5454nick5454 USUniversity ✭✭✭

    I'd this I copied from developer.xamarin.com/recipes/testcloud/set-accessibilityidentifier-ios/

    Then in my second screen I have
    UIView testView = new UIView (this.View.Frame); testView.SetAccessibilityId ("MainFluentView"); Add (testView);

    And finally my test:
    `[Test]
    public void CanSeeButton ()
    {
    Func<AppQuery, AppQuery> fluentView = c => c.Marked("MainFluentView");

                //_app.Repl ();
    
            _app.WaitForElement (fluentView,
                "Waiting for view");
    
    
            _app.Repl ();`
    
  • nick5454nick5454 USUniversity ✭✭✭

    Forgot to mention I show a splash page, then show a landing page, the the actual login page this view exists on. It never sees this view ( takes 3 seconds to appear ) I have a timeout of 10 seconds.

  • nick5454nick5454 USUniversity ✭✭✭

    Can this be moved to the Xamarin Test Cloud forum so maybe it has a better chance of being answered.

Sign In or Register to comment.