Exemplo n.º 1
0
        public void ClickHyperlinkLlaunchedModal()
        {
            WPFLabel labelContainingHyperlink = Window.Get <WPFLabel>("hyperlinkLaunchesModal");

            labelContainingHyperlink.Hyperlink("Launch Modal").Click();
            CloseModal(Window);
        }
Exemplo n.º 2
0
        public void ClickHyperlink()
        {
            WPFLabel labelContainingHyperlink = Window.Get <WPFLabel>("linkLabel");

            labelContainingHyperlink.Hyperlink("Link Text").Click();
            AssertResultLabelText("Link label clicked");
        }
Exemplo n.º 3
0
        public void ShouldDisplayWorkspace(string workspace)
        {
            WPFLabel titleLabel = mainWindow.Get <WPFLabel>("WorkspaceTitle");

            Assert.That(titleLabel, Is.Not.Null, "Could not find the title label for the active content item.");

            Assert.That(titleLabel.Text, Is.StringMatching(workspace).IgnoreCase);
        }
        private static int FindPromptIndex(UIItemCollection controls, int startingIndex)
        {
            int promptIndex = startingIndex;

            while (promptIndex >= 0)
            {
                WPFLabel textBlock = controls[promptIndex] as WPFLabel;

                if (textBlock != null && (textBlock.Text == DefaultPrompt || textBlock.Text == DbgPrompt || textBlock.Text == ExecutingPrompt))
                {
                    break;
                }

                promptIndex--;
            }

            return(promptIndex);
        }
        public override ComponentFactory CreateComponent(Components comp, int height, int width, int leftMargin, int topMargin, string content)
        {
            WPFComponentFactory c = new WPFComponentFactory();

            switch (comp)
            {
            case Components.Label:
                c = new WPFLabel(height, width, leftMargin, topMargin, content);
                break;

            case Components.TextBox:
                c = new WPFTextBox(height, width, leftMargin, topMargin, content);
                break;

            default:
                break;
            }
            return(c);
        }