Questions tagged [teststack]

Use this tag for TestStack.White which is the official replacement for White NuGet package

TestStack.White is a NuGet package and is the official replacement for White:

White is a framework for automating rich client applications based on Win32, WinForms, WPF, Silverlight and SWT (Java) platforms.

Site: https://www.nuget.org/packages/TestStack.White/

42 questions
0
votes
1 answer

Test Stack White attach to app which does not show up in the task manager

I am working on an automated test and would like to perform actions on the windows event viewer. I have managed to open the event viewer through my test, but it does not attach to the app for me to make any actions like button presses/clicks as…
0
votes
1 answer

How to Running all tests 2 times with Nunit

i want to run all tests 1 time. One method will run after all tests are finished. This test will change the language of the application. How can I start all tests from scratch?
0
votes
1 answer

Getting Exception System.MissingMethodException: Method not found: 'System.Windows.Rect System.Windows.Automation.... in in TestStackWhite Application

I am writing a test method to launch a window application. Below is my code namespace UnitTestProject1 { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { …
Satwik163
  • 1
  • 1
0
votes
2 answers

check that a function had been called with a certain parameter in unit testing

I'm working with BDDfy, AutoFixture and Moq for my testing. I want to check that a function had been called with a certain parameter. The function has a number of parameters which it gets. Updated This is the given step ICollection result =…
Ace
  • 831
  • 2
  • 8
  • 28
0
votes
0 answers

Issues automating a WPF with dynamic 'AutomationID' and no 'Name' property - C#

I have been working on an attempt to automate a Windows Program using C#. After using Inspect.exe from Windows Kits (SDK), it seems that many of the elements that I am trying to work with do not have a static AutomationID, an element Name, etc. The…
0
votes
1 answer

Can I configure TestStack.White UI test cases in CI\CD pipeline

I am in the process of configuring Azure DevOps CI\CD pipeline for my WPF desktop application. UI test cases of the WPF application are written using TestStack.White framework. Is it possible to use test cases written usingTestStack.White…
0
votes
0 answers

How to use keystrokes, e.g. SHIFT + RETURN, using TestStack library in C#

I need to automate some repetive tasks performed in an application installed in my machine. I'm coding in C# and using the library TestStack.White I can key in keyboard inputs like SHIFT or RETURN but I can´t figure out how to send a key combo. I…
0
votes
0 answers

Unable to cast object of type 'TestStack.White.UIItems.TabItems.TabPage' to type 'TestStack.White.UIItems.Button'

I am new to c# and automation.I am trying to automate a process in an app. I found automation id of an element using inspect.exe and tried the following code to click the element public void import_Enc(string excelPath, string fileName, string…
def0x
  • 1
  • 2
0
votes
1 answer

Block cursor movement during automation run

I am writing some Automation tests using Teststack white framework (C#, .net) for my WPF application. I want any cursor movement to be frozen while the tests are running. Is there any way to do that? I already tried public partial class…
An Kumar
  • 77
  • 1
  • 8
0
votes
0 answers

Using TestStack.White to test a controls which fire off background work

I am trying to write UI test case for a WPF application. This consists of a search textbox. On providing input into the textbox, search for the input string is done in a background thread. This is my basic code: public void TestMethod1() { var…
peeyush singh
  • 1,337
  • 1
  • 12
  • 23
0
votes
2 answers

TestStack.White ListBox.SelectedItemText not working

I have a WinForms Dialog with 2 ListBox controls. In the application under test, doubleClicking any items in one of the listbox controls (I'll call this the CONTROL LISTBOX) results in selecting the matching item in the other listbox (SLAVE…
Jeff H
  • 157
  • 11
0
votes
2 answers

Bodi Interface Cannot be resolved using SpecFlow

I have searched all over and have found multiple posts about Bodi exceptions in reference to SpecFlow but none of them are with TestStack.White and none of the responses are working in my situation. I am using the following: SpecFlow…
J.R. Bye
  • 98
  • 2
  • 12
0
votes
0 answers

TestStack | How to find custom controls and invoke methods / fire events

I have a custom Control HtButton which inherits from Control. I made a custom FrameworkElementAutomationPeer and override the OnCreateAutomationPeer() in HtButton. public class HtButtonAutomationPeer : FrameworkElementAutomationPeer { public…
Dominic Jonas
  • 4,717
  • 1
  • 34
  • 77
0
votes
1 answer

TestStack.White panel click

I want to create an autologin WinForms app with TestStack.White. Here is my code: private void button1_Click(object sender, EventArgs e) { Process[] process = Process.GetProcessesByName("XYapp"); TestStack.White.Application app =…
Gergo Papp
  • 19
  • 1
  • 5
0
votes
1 answer

Visibility parameter of WPF control not visible with UI Automation?

I started writing test for a WPF application with FlaUI (UI Automation framework). Now I want to get the Visibility value of a couple of buttons. These buttons are located on the same position in the WPF window. The first is a start button which…
Kevin S
  • 21
  • 4