white

TestStack White doesn't find TextBox in WPF Application

落花浮王杯 提交于 2019-12-07 15:08:30
I use TestStack White framework to automate testing of a WPF Application It needs to open modal window and access TextBox in it. Everything works well, but White can't find Textbox, although it finds other elements of window I tried the following lines of code: TestStack.White.UIItems.TextBox TextBox = CreateBranch.Get<TestStack.White.UIItems.TextBox>(SearchCriteria.byAutomationId("Title")); where CreateBranch is modal window I also tried (SearchCriteria.All), (SearchCriteria.ByControlType) and nothing works Coded UI tool finds this element well by AutomationID, but I need to do it in White

How do I access a MessageBox with white?

不问归期 提交于 2019-12-07 11:23:55
问题 I have a simple message box in a WPF application that is launched as below: private void Button_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Howdy", "Howdy"); } I can get white to click my button and launch the message box. UISpy shows it as a child of my window I couldn't work out the method to access it. How do I get access to my MessageBox to verify its contents? 回答1: Found it! The window class has a MessageBox method that does the trick: var app = Application.Launch(@"c:

Is there any way to activate a window with White?

痞子三分冷 提交于 2019-12-07 00:16:42
Is there a way to activate or bring a window of an external application to the front? The closest I could get was var application = Application.Attach("SearchApp"); var searchWindow = application.GetWindows()[0]; searchWindow.Focus(DisplayState.Maximized); but all that does is maximize it in the background if it's not currently active. Got it working. [DllImport("user32.dll", SetLastError = true)] internal static extern bool SetForegroundWindow(IntPtr windowHandle); public bool SearchTest(string file) { try { // White stuff, not relevant to problem //var application = Application.Attach(

White UIAutomation click() stops working on different platform

梦想的初衷 提交于 2019-12-06 03:49:59
问题 I'm using White to automate the BDD testing of our C# WPF UI. My first couple of tests are working well on my development machine (running Windows 7). However, when I try and run the same code on the build server (virtual machine running Windows server 2003 R2) it doesn't work correctly. In both cases the tests are run from the command line and the tests are using the Cuke4Nuke framework. In the case of the server I am accessing the server via Remote Desktop Connection. The code looks like:

WPF, Project White and Infragistics

点点圈 提交于 2019-12-05 19:58:24
I am trying to use Project White to write automated tests for my WPF application. It is all going well until I try to interact with Infragistics controls. Has anyone had any experience of this set up and would you be able to post an example of how I can (for example) interact with the XamRibbon or XamOutlookBar? Bit of a generic answer I'm afraid, but if White isn't helping you, you can use Microsoft UI Automation directly. First, find your control. If it's got a WPF "Name" then it probably has an automation id which matches the name: AutomationElement element = AutomationElement.Root

How do I access a MessageBox with white?

耗尽温柔 提交于 2019-12-05 15:29:05
I have a simple message box in a WPF application that is launched as below: private void Button_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Howdy", "Howdy"); } I can get white to click my button and launch the message box. UISpy shows it as a child of my window I couldn't work out the method to access it. How do I get access to my MessageBox to verify its contents? Found it! The window class has a MessageBox method that does the trick: var app = Application.Launch(@"c:\ApplicationPath.exe"); var window = app.GetWindow("Window1"); var helloButton = window.Get<Button>("Hello");

SpecFlow Visual Studio extension attempted to use SpecFlow code-behind generator 1.9

你。 提交于 2019-12-05 07:05:20
问题 I am getting the following error while trying to build my automation solution. Due to which i am unable to change anything in my feature file at the moment. error Version conflict - SpecFlow Visual Studio extension attempted to use SpecFlow code-behind generator 1.9, but project 'POC.Specs' references SpecFlow 2.0. error We recommend migrating to MSBuild code-behind generation to resolve this issue. error For more information see https://specflow.org/documentation/Generate-Tests-from-MsBuild/

Integration testing with White [closed]

别来无恙 提交于 2019-12-04 19:09:38
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . Has anyone got experience with the white framework? www.codeplex.com/white ? I'm thinking about using it for the next project for basic smoke tests of our windows client. I'd like some advice on articles or your

White UIAutomation click() stops working on different platform

折月煮酒 提交于 2019-12-04 09:46:33
I'm using White to automate the BDD testing of our C# WPF UI. My first couple of tests are working well on my development machine (running Windows 7). However, when I try and run the same code on the build server (virtual machine running Windows server 2003 R2) it doesn't work correctly. In both cases the tests are run from the command line and the tests are using the Cuke4Nuke framework. In the case of the server I am accessing the server via Remote Desktop Connection. The code looks like: var application = Application.Launch("whiteApp.exe"); var initializeOption = InitializeOption.NoCache;

Is there Anyone who Successfully Implement UI Test Automation Regime using Microsoft UI Automation?

拜拜、爱过 提交于 2019-11-30 12:17:41
问题 I am looking for an Automated UI test framework/ software tool. In the past I have been using TestComplete, and although it's a good piece of software, but the concept of GUI test automation was deemed to be sufficiently difficult that I wrote a few posts to complain about it. One of the problems with third party test automation tool is that you have to learn new language in order to be productive on it, not to mention that the tooling support is poor. I am now planning to look into Microsoft