public void AutomationPeerTest()
        {
            if (PlatformConfiguration.IsDevice(DeviceType.Phone))
            {
                Log.Comment("Skipping tests on phone, because menubar is not supported.");
                return;
            }
            using (var setup = new TestSetupHelper("MenuBar Tests"))
            {
                var fileButton   = FindElement.ById <Button>("FileItem");
                var fileButtonEC = new ExpandCollapseImplementation(fileButton);

                // Invoke
                fileButton.Invoke();
                Wait.ForIdle();
                VerifyElement.Found("New", FindBy.Name);
                fileButton.Invoke();
                Wait.ForIdle();
                VerifyElement.NotFound("New", FindBy.Name);

                // Expand collapse
                fileButtonEC.Expand();
                Wait.ForIdle();
                VerifyElement.Found("New", FindBy.Name);
                fileButtonEC.Collapse();
                Wait.ForIdle();
                VerifyElement.NotFound("New", FindBy.Name);

                // Verify GetNameCore() is working if AutomationProperties.Name isn't set
                VerifyElement.Found("Format", FindBy.Name);
            }
        }