white

How to enable a button using UIAutomation or White

我的未来我决定 提交于 2019-12-13 03:08:10
问题 I'm trying to automate an installation wizard and I needed to click on a button that is not enabled. I know that this can be done using Windows Messages, but I was wondering if there is already support in White or UIAutomation for this For reference this doesn't work: var invoke = (System.Windows.Automation.InvokePattern)setup.button("Next >").AutomationElement.GetCurrentPattern(System.Windows.Automation.InvokePattern.Pattern); invoke.Invoke(); neither does this var guiAutomation = new API

Find option to right click c# White/TestStack UI Automation

妖精的绣舞 提交于 2019-12-12 08:57:34
问题 I am creating a software process automation using the language C # framework by White \ TestStack. I have a problem because I am unable to capture an option when I click with the right mouse button. Image Preview The code I'm using to try this panel.RightClick(); var propClick = _mainWindow.Get<White.Core.UIItems.MenuItems.PopupMenu>(SearchCriteria.ByText("Propeties")); propClick .Click(); can not capture the option, making the variable becomes null propClick Sorry my english sucks :( Help!

Retrieve Multiple UIItems ByClassName

∥☆過路亽.° 提交于 2019-12-12 02:55:32
问题 I have a Custom type, under which I have multiple TextBox controls. the problem is all the TextBox's doesn't have either an Automation Id or the Name. So, I wanted to retrieve all the textboxes in a list, so that, I can operate upon them. I know it's not a good practice to do so but I don't have any other option. The problem is how do I retrieve all the these TextBox's which are under a particular custom type in a List? If anyone knows a better way around then please suggest. 回答1: Condition

Unable to click a button even though I am able to retrieve it using the Name

允我心安 提交于 2019-12-11 23:10:11
问题 var navigator = BonusAppControllers.EbsControl.CurrentApp.GetWindow("XWindow").Get(SearchCriteria.ByAutomationId("AnimatedExplorerNavigator")); AutomationElement dashboardElement = navigator.AutomationElement.FindFirst(TreeScope.Subtree,SearchConditionFactory.CreateForName("NavigateLink_1").AutomationCondition); var dashBoardBtn = new Button(dashboardElement, navigator.ActionListener); dashBoardBtn.Click(); I have this code for the button with Name as NavigateLink_1. Now when i run this and

White Automation framework throws an exception when using “White.Core.Desktop” Class

故事扮演 提交于 2019-12-11 11:40:45
问题 I am using White Framework for automation. when I trying to get desktop instance I got exception "The type initializer for 'White.Core.Desktop' threw an exception." My code looks like : var window = White.Core.Desktop.Instance.Windows().Find(obj => obj.Title.Contains("TestAppHome")); Is there any way to capture the window without exception that is without using White.Core.Desktop class? Any help would be greatly appreciated ! 回答1: Try this one: List<White.Core.UIItems.WindowItems.Window>

teststack white get the main window after the login window

左心房为你撑大大i 提交于 2019-12-11 10:34:15
问题 I am working on automating a windows application using Teststack white, the current issues that I have is that after logging in the main application, white doesn't seems to find the new window. var pathAp = appPath(path); Application application = Application.Launch(pathAp); Window window = application.GetWindow("login"); TextBox userName = window.Get<TextBox>("userName"); TextBox pass = window.Get<TextBox>("pass"); userName.Enter("user1"); pass.Enter("pass"); Button login = window.Get<Button

how to automate xceed updown controls

此生再无相见时 提交于 2019-12-10 22:53:54
问题 For my WPF application I am working on a UI automated test using TestStack.White. I am using the DoubleUpDown controls from the xceed wpf toolkit in my app. How can I get access to the DoubleUpDown control in my UI automated tests? 回答1: By using the UIA Verify, you can see that the DoubleUpDown control is seen as three controls with no hierarchy information and the following AutomationIds: AutoSelectTextBox Part_IncreaseButton Part_DecreaseButton So you can automate them as normal controls

How can I configure TestStack.White timeouts?

拟墨画扇 提交于 2019-12-10 15:29:53
问题 I'm using Visual Studio 2010 and I got TestStack.White via NuGet (I got version 0.10.3.118 ). Problem is, my test clicks a button which triggers an action that exceeds the default 5 second timeout. So my test always yields: [Error] 'White.Core.Interceptors.CoreInterceptor' Error when invoking Click, on Button with parameters: White.Core.UIItems.UIActionException : Window didn't respond, after waiting for 5000 ms ----> System.Exception : Timeout occured, after waiting for 5000 ms I read White

TestStack White doesn't find TextBox in WPF Application

戏子无情 提交于 2019-12-08 06:24:14
问题 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)

Is there any way to activate a window with White?

一笑奈何 提交于 2019-12-08 03:53:04
问题 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. 回答1: Got it working. [DllImport("user32.dll", SetLastError = true)] internal static extern bool SetForegroundWindow(IntPtr windowHandle); public bool