Inheritance: System.Windows.Automation.Provider.IRawElementProviderSimple
Ejemplo n.º 1
0
        public void LabeledByTest()
        {
            MockProvider mockWindow = new MockProvider();

            mockWindow.SetPropertyValue(AEIds.ControlTypeProperty.Id,
                                        ControlType.Window.Id);
            mockWindow.SetPropertyValue(AEIds.NativeWindowHandleProperty.Id,
                                        new IntPtr(1234));

            string       labelText = "label text";
            MockProvider mockLabel = new MockProvider();

            mockLabel.SetPropertyValue(AEIds.ControlTypeProperty.Id,
                                       ControlType.Text.Id);
            mockLabel.SetPropertyValue(AEIds.NameProperty.Id,
                                       labelText);

            //string buttonText = "click me";
            MockProvider mockButton = new MockProvider();

            mockButton.SetPropertyValue(AEIds.ControlTypeProperty.Id,
                                        ControlType.Button.Id);

            AddProvider(mockWindow);
            AddProvider(mockLabel);
            AddProvider(mockButton);

            string windowPath = "/org/mono/UIAutomation/Element/1";
            string labelPath  = "/org/mono/UIAutomation/Element/2";
            string buttonPath = "/org/mono/UIAutomation/Element/3";

            string ourBus = TestHelper.CurrentBus;

            IAutomationElement windowElement = TestHelper.GetElement(ourBus, windowPath);
            IAutomationElement labelElement  = TestHelper.GetElement(ourBus, labelPath);
            IAutomationElement buttonElement = TestHelper.GetElement(ourBus, buttonPath);

            // Verify that we matched up our elements correctly
            Assert.AreEqual(ControlType.Window.Id,
                            windowElement.ControlTypeId,
                            "Window ControlType");
            Assert.AreEqual(ControlType.Text.Id,
                            labelElement.ControlTypeId,
                            "Label ControlType");
            Assert.AreEqual(ControlType.Button.Id,
                            buttonElement.ControlTypeId,
                            "Button ControlType");

            // Test LabeledBy Initial Value
            Assert.AreEqual(string.Empty,
                            buttonElement.LabeledByElementPath,
                            "Default LabeledBy value");

            // Test with LabeledBy Property Set
            mockButton.SetPropertyValue(AEIds.LabeledByProperty.Id,
                                        mockLabel);
            Assert.AreEqual(labelPath,
                            buttonElement.LabeledByElementPath,
                            "Button should be LabeledBy label element now");
        }
Ejemplo n.º 2
0
        private IAutomationElement SetupBasicWindowElement(MockProvider mockWindow)
        {
            mockWindow.SetPropertyValue(AEIds.ControlTypeProperty.Id,
                                        ControlType.Window.Id);
            mockWindow.SetPropertyValue(AEIds.NativeWindowHandleProperty.Id,
                                        new IntPtr(1234));

            AddProvider(mockWindow);

            string ourBus = TestHelper.CurrentBus;

            string windowPath = "/org/mono/UIAutomation/Element/1";

            IAutomationElement windowElement = TestHelper.GetElement(ourBus, windowPath);

            return(windowElement);
        }
Ejemplo n.º 3
0
        public void BoundingRectangleTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(new DC.Rect(SW.Rect.Empty),
                            windowElement.BoundingRectangle,
                            "Initial value");

            // Test set value
            SW.Rect testVal = new SW.Rect(5, 6, 7, 8);
            mockWindow.SetPropertyValue(AEIds.BoundingRectangleProperty.Id,
                                        testVal);
            Assert.AreEqual(new DC.Rect(testVal),
                            windowElement.BoundingRectangle,
                            "Set value");
        }
Ejemplo n.º 4
0
        public void LocalizedControlTypeTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(string.Empty,
                            windowElement.LocalizedControlType,
                            "Initial value");

            // Test set value
            object testVal = ControlType.Window.LocalizedControlType;

            mockWindow.SetPropertyValue(AEIds.LocalizedControlTypeProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.LocalizedControlType,
                            "Set value");
        }
Ejemplo n.º 5
0
        public void ItemTypeTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(string.Empty,
                            windowElement.ItemType,
                            "Initial value");

            // Test set value
            object testVal = "extra special window type";

            mockWindow.SetPropertyValue(AEIds.ItemTypeProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.ItemType,
                            "Set value");
        }
Ejemplo n.º 6
0
        public void ItemStatusTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(string.Empty,
                            windowElement.ItemStatus,
                            "Initial value");

            // Test set value
            object testVal = "all systems go";

            mockWindow.SetPropertyValue(AEIds.ItemStatusProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.ItemStatus,
                            "Set value");
        }
Ejemplo n.º 7
0
        public void IsRequiredForFormTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(false,
                            windowElement.IsRequiredForForm,
                            "Initial value");

            // Test set value
            object testVal = true;

            mockWindow.SetPropertyValue(AEIds.IsRequiredForFormProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.IsRequiredForForm,
                            "Set value");
        }
Ejemplo n.º 8
0
        public void HelpTextTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(string.Empty,
                            windowElement.HelpText,
                            "Initial value");

            // Test set value
            object testVal = "Sample Help Text";

            mockWindow.SetPropertyValue(AEIds.HelpTextProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.HelpText,
                            "Set value");
        }
Ejemplo n.º 9
0
        public void ClickablePointTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(new DC.Point(new SW.Point(double.NegativeInfinity,
                                                      double.NegativeInfinity)),
                            windowElement.ClickablePoint,
                            "Initial value");

            // Test set value
            SW.Point testVal = new SW.Point(7, 8);
            mockWindow.SetPropertyValue(AEIds.ClickablePointProperty.Id,
                                        testVal);
            Assert.AreEqual(new DC.Point(testVal),
                            windowElement.ClickablePoint,
                            "Set value");
        }
Ejemplo n.º 10
0
        public void NameTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(string.Empty,
                            windowElement.Name,
                            "Initial value");

            // Test set value
            object testVal = "my cool window";

            mockWindow.SetPropertyValue(AEIds.NameProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.Name,
                            "Set value");
        }
Ejemplo n.º 11
0
        public void AcceleratorKeyTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(string.Empty,
                            windowElement.AcceleratorKey,
                            "Initial value");

            // Test set value
            object testVal = "alt+s";

            mockWindow.SetPropertyValue(AEIds.AcceleratorKeyProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.AcceleratorKey,
                            "Set value");
        }
Ejemplo n.º 12
0
        public void AutomationIdTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(string.Empty,
                            windowElement.AutomationId,
                            "Initial value");

            // Test set value
            int testVal = 3254;

            mockWindow.SetPropertyValue(AEIds.AutomationIdProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal.ToString(),
                            windowElement.AutomationId,
                            "Set value");
        }
Ejemplo n.º 13
0
        public void RuntimeIdTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(0,
                            windowElement.RuntimeId.Length,
                            "Initial value");

            // Test set value
            object testVal = new int [] { 5, 6 };

            mockWindow.SetPropertyValue(AEIds.RuntimeIdProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.RuntimeId,
                            "Set value");
        }
Ejemplo n.º 14
0
        public void OrientationTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(OrientationType.None,
                            windowElement.Orientation,
                            "Initial value");

            // Test set value
            object testVal = OrientationType.Horizontal;

            mockWindow.SetPropertyValue(AEIds.OrientationProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.Orientation,
                            "Set value");
        }
Ejemplo n.º 15
0
        public void ProcessIdTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            // Test initial value
            Assert.AreEqual(-1,
                            windowElement.ProcessId,
                            "Initial value");

            // Test set value
            object testVal = 64523;

            mockWindow.SetPropertyValue(AEIds.ProcessIdProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.ProcessId,
                            "Set value");
        }
Ejemplo n.º 16
0
        public void NativeWindowHandleTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);
            IntPtr originalPtr = (IntPtr)
                                 mockWindow.GetPropertyValue(AEIds.NativeWindowHandleProperty.Id);

            // Test initial value
            mockWindow.SetPropertyValue(AEIds.NativeWindowHandleProperty.Id,
                                        null);
            Assert.AreEqual(0,
                            windowElement.NativeWindowHandle,
                            "Initial value");

            // Test set value
            mockWindow.SetPropertyValue(AEIds.NativeWindowHandleProperty.Id,
                                        originalPtr);
            Assert.AreEqual(originalPtr.ToInt32(),
                            windowElement.NativeWindowHandle,
                            "Set value");
        }
Ejemplo n.º 17
0
        public void ControlTypeTest()
        {
            MockProvider       mockWindow    = new MockProvider();
            IAutomationElement windowElement =
                SetupBasicWindowElement(mockWindow);

            mockWindow.SetPropertyValue(AEIds.ControlTypeProperty.Id,
                                        null);

            // Test initial value
            Assert.AreEqual(-1,
                            windowElement.ControlTypeId,
                            "Initial value");

            // Test set value
            object testVal = ControlType.Window.Id;

            mockWindow.SetPropertyValue(AEIds.ControlTypeProperty.Id,
                                        testVal);
            Assert.AreEqual(testVal,
                            windowElement.ControlTypeId,
                            "Set value");
        }
Ejemplo n.º 18
0
		public void LocalizedControlTypeTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (string.Empty,
			                 windowElement.LocalizedControlType,
			                 "Initial value");

			// Test set value
			object testVal = ControlType.Window.LocalizedControlType;
			mockWindow.SetPropertyValue (AEIds.LocalizedControlTypeProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.LocalizedControlType,
			                 "Set value");
		}
Ejemplo n.º 19
0
		public void ItemTypeTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (string.Empty,
			                 windowElement.ItemType,
			                 "Initial value");

			// Test set value
			object testVal = "extra special window type";
			mockWindow.SetPropertyValue (AEIds.ItemTypeProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.ItemType,
			                 "Set value");
		}
Ejemplo n.º 20
0
		public void ItemStatusTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (string.Empty,
			                 windowElement.ItemStatus,
			                 "Initial value");

			// Test set value
			object testVal = "all systems go";
			mockWindow.SetPropertyValue (AEIds.ItemStatusProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.ItemStatus,
			                 "Set value");
		}
Ejemplo n.º 21
0
		public void IsRequiredForFormTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (false,
			                 windowElement.IsRequiredForForm,
			                 "Initial value");

			// Test set value
			object testVal = true;
			mockWindow.SetPropertyValue (AEIds.IsRequiredForFormProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.IsRequiredForForm,
			                 "Set value");
		}
Ejemplo n.º 22
0
		public void HelpTextTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (string.Empty,
			                 windowElement.HelpText,
			                 "Initial value");

			// Test set value
			object testVal = "Sample Help Text";
			mockWindow.SetPropertyValue (AEIds.HelpTextProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.HelpText,
			                 "Set value");
		}
Ejemplo n.º 23
0
		public void OrientationTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (OrientationType.None,
			                 windowElement.Orientation,
			                 "Initial value");

			// Test set value
			object testVal = OrientationType.Horizontal;
			mockWindow.SetPropertyValue (AEIds.OrientationProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.Orientation,
			                 "Set value");
		}
Ejemplo n.º 24
0
		public void BoundingRectangleTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (new DC.Rect (SW.Rect.Empty),
			                 windowElement.BoundingRectangle,
			                 "Initial value");

			// Test set value
			SW.Rect testVal = new SW.Rect (5, 6, 7, 8);
			mockWindow.SetPropertyValue (AEIds.BoundingRectangleProperty.Id,
			                             testVal);
			Assert.AreEqual (new DC.Rect (testVal),
			                 windowElement.BoundingRectangle,
			                 "Set value");
		}
Ejemplo n.º 25
0
		public void AutomationIdTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (string.Empty,
			                 windowElement.AutomationId,
			                 "Initial value");

			// Test set value
			int testVal = 3254;
			mockWindow.SetPropertyValue (AEIds.AutomationIdProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal.ToString (),
			                 windowElement.AutomationId,
			                 "Set value");
		}
Ejemplo n.º 26
0
		public void AcceleratorKeyTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (string.Empty,
			                 windowElement.AcceleratorKey,
			                 "Initial value");

			// Test set value
			object testVal = "alt+s";
			mockWindow.SetPropertyValue (AEIds.AcceleratorKeyProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.AcceleratorKey,
			                 "Set value");
		}
Ejemplo n.º 27
0
		public void RuntimeIdTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (0,
			                 windowElement.RuntimeId.Length,
			                 "Initial value");

			// Test set value
			object testVal = new int [] {5, 6};
			mockWindow.SetPropertyValue (AEIds.RuntimeIdProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.RuntimeId,
			                 "Set value");
		}
Ejemplo n.º 28
0
		public void NameTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (string.Empty,
			                 windowElement.Name,
			                 "Initial value");

			// Test set value
			object testVal = "my cool window";
			mockWindow.SetPropertyValue (AEIds.NameProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.Name,
			                 "Set value");
		}
Ejemplo n.º 29
0
		public void NativeWindowHandleTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);
			IntPtr originalPtr = (IntPtr)
				mockWindow.GetPropertyValue (AEIds.NativeWindowHandleProperty.Id);

			// Test initial value
			mockWindow.SetPropertyValue (AEIds.NativeWindowHandleProperty.Id,
			                             null);
			Assert.AreEqual (0,
			                 windowElement.NativeWindowHandle,
			                 "Initial value");

			// Test set value
			mockWindow.SetPropertyValue (AEIds.NativeWindowHandleProperty.Id,
			                             originalPtr);
			Assert.AreEqual (originalPtr.ToInt32 (),
			                 windowElement.NativeWindowHandle,
			                 "Set value");
		}
Ejemplo n.º 30
0
		public void ClickablePointTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (new DC.Point (new SW.Point (double.NegativeInfinity,
			                                               double.NegativeInfinity)),
			                 windowElement.ClickablePoint,
			                 "Initial value");

			// Test set value
			SW.Point testVal = new SW.Point (7, 8);
			mockWindow.SetPropertyValue (AEIds.ClickablePointProperty.Id,
			                             testVal);
			Assert.AreEqual (new DC.Point (testVal),
			                 windowElement.ClickablePoint,
			                 "Set value");
		}
Ejemplo n.º 31
0
		public void ProcessIdTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);

			// Test initial value
			Assert.AreEqual (-1,
			                 windowElement.ProcessId,
			                 "Initial value");

			// Test set value
			object testVal = 64523;
			mockWindow.SetPropertyValue (AEIds.ProcessIdProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.ProcessId,
			                 "Set value");
		}
Ejemplo n.º 32
0
		public void ControlTypeTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			IAutomationElement windowElement =
				SetupBasicWindowElement (mockWindow);
			mockWindow.SetPropertyValue (AEIds.ControlTypeProperty.Id,
			                             null);

			// Test initial value
			Assert.AreEqual (-1,
			                 windowElement.ControlTypeId,
			                 "Initial value");

			// Test set value
			object testVal = ControlType.Window.Id;
			mockWindow.SetPropertyValue (AEIds.ControlTypeProperty.Id,
			                             testVal);
			Assert.AreEqual (testVal,
			                 windowElement.ControlTypeId,
			                 "Set value");
		}
Ejemplo n.º 33
0
		private IAutomationElement SetupBasicWindowElement (MockProvider mockWindow)
		{
			mockWindow.SetPropertyValue (AEIds.ControlTypeProperty.Id,
			                             ControlType.Window.Id);
			mockWindow.SetPropertyValue (AEIds.NativeWindowHandleProperty.Id,
			                             new IntPtr (1234));

			AddProvider (mockWindow);

			string ourBus = TestHelper.CurrentBus;

			string windowPath = "/org/mono/UIAutomation/Element/1";

			IAutomationElement windowElement = TestHelper.GetElement (ourBus, windowPath);
			return windowElement;
		}
Ejemplo n.º 34
0
		public void LabeledByTest ()
		{
			MockProvider mockWindow = new MockProvider ();
			mockWindow.SetPropertyValue (AEIds.ControlTypeProperty.Id,
			                             ControlType.Window.Id);
			mockWindow.SetPropertyValue (AEIds.NativeWindowHandleProperty.Id,
			                             new IntPtr (1234));

			string labelText = "label text";
			MockProvider mockLabel = new MockProvider ();
			mockLabel.SetPropertyValue (AEIds.ControlTypeProperty.Id,
			                             ControlType.Text.Id);
			mockLabel.SetPropertyValue (AEIds.NameProperty.Id,
			                             labelText);

			//string buttonText = "click me";
			MockProvider mockButton = new MockProvider ();
			mockButton.SetPropertyValue (AEIds.ControlTypeProperty.Id,
			                             ControlType.Button.Id);

			AddProvider (mockWindow);
			AddProvider (mockLabel);
			AddProvider (mockButton);

			string windowPath = "/org/mono/UIAutomation/Element/1";
			string labelPath = "/org/mono/UIAutomation/Element/2";
			string buttonPath = "/org/mono/UIAutomation/Element/3";

			string ourBus = TestHelper.CurrentBus;

			IAutomationElement windowElement = TestHelper.GetElement (ourBus, windowPath);
			IAutomationElement labelElement = TestHelper.GetElement (ourBus, labelPath);
			IAutomationElement buttonElement = TestHelper.GetElement (ourBus, buttonPath);

			// Verify that we matched up our elements correctly
			Assert.AreEqual (ControlType.Window.Id,
			                 windowElement.ControlTypeId,
			                 "Window ControlType");
			Assert.AreEqual (ControlType.Text.Id,
			                 labelElement.ControlTypeId,
			                 "Label ControlType");
			Assert.AreEqual (ControlType.Button.Id,
			                 buttonElement.ControlTypeId,
			                 "Button ControlType");

			// Test LabeledBy Initial Value
			Assert.AreEqual (string.Empty,
			                 buttonElement.LabeledByElementPath,
			                 "Default LabeledBy value");

			// Test with LabeledBy Property Set
			mockButton.SetPropertyValue (AEIds.LabeledByProperty.Id,
			                             mockLabel);
			Assert.AreEqual (labelPath,
			                 buttonElement.LabeledByElementPath,
			                 "Button should be LabeledBy label element now");
		}