locked
How to check button disable/enable in Xamarin UI Test, Specflow Step definition RRS feed

  • Question

  • User390055 posted

    Button Text="agree" AutomationId="btnAgree" x:Name="AgreeButton"

    app.WaitForElement(c => c.Marked("btnAgree")); app.Tap(c => c.Marked("btnAgree"));

    Anyone have an idea about how to check button is disable or enable in Xamarin UI Test, Specflow Step definition please let me know your comments.

    Tuesday, November 5, 2019 6:44 AM

All replies

  • User369978 posted

    Try this plugin : https://github.com/pranart/FormsTest , you could access almost every property value from Xamarin.Forms Controls.

    <ft:Button 
        AutomationId="button" 
        VerticalOptions="Center" 
        HorizontalOptions="Center" />
    
        [Test]
        public void TestFormsLabelTextColorProperty()
        {
            app.WaitForElement("button");
            var IsEnabled = app.FormsPropertyGet("FtLabel.IsEnabled");                     
        }
    
    Tuesday, November 5, 2019 2:47 PM