Search Results

Search found 5 results on 1 pages for 'uiautomation'.

Page 1/1 | 1 

  • How do I bring Set Focus of MDI Child Window using UIAutomation

    - by Scott Ferguson
    We have an old legacy application we need to automate. It uses MDI Windows. We're using UIAutomation and I can succesfully get the appropriate AutomationElement for each MDI Child window. What I cannot do is bring that element into focus. Here is some example code that I tried, that fails: var desktop = AutomationElement.RootElement; var dolphin = desktop.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "Dolphin for Windows", PropertyConditionFlags.IgnoreCase)); dolphin.SetFocus(); var workspace = dolphin.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "Workspace", PropertyConditionFlags.None)); var childWindow = workspace.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "Sharp ")); childWindow.SetFocus(); The last line in this code fails with System.InvalidOperationException Experimenting, I tried finding a control on the childWindow, and calling SetFocus on it. It DID correctly set the focus on the right control, but it did not bring the MDI window to the foreground. Any ideas?

    Read the article

  • How do read/interact with an old ActiveX SSUltraGrid using UIAutomation

    - by Nigel Thorne
    I am investigating automated testing of an old Win32 application that used ActiveX controls. I am spiking use White (from Thougthworks) that uses Microsoft UIAutomation. I can find the AutomationElement related to the control, but how do I interact with it? Spy++ sees the grid control as a single window, so I can't talk to rows, columns, or cells directly. How do I talk to the SSUltraGrid control from my test code? Cheers Nigel

    Read the article

  • UI Automation Button Style Enabled

    - by Victor Gaspar
    Hi, I'm evaluating UI Automation for UI testing for that I have a WPF application with the following button defined: <Button Style="{DynamicResource ButtonStyle}" x:Name="MyBtn"/> when I need to visually disable the button I just change the style so the user is aware that the button is disabled (the colour changed) but still the button is internally enabled so I can still launch the OnClick event in order to show a message when the user clicks on a "disabled" button. Now the problem is that I don't know how to check from UI Automation the Style that its currently applied i.e. if the button is disabled or enabled. Do you know how can I do that? In a normal situation I should do something like that: Automation.Condition cEBtn = new PropertyCondition(AutomationElement.AutomationIdProperty, "MyBtn"); AutomationElement mybtnElement = appRegraceElement.FindFirst(TreeScope.Children, cEBtn); bool disMyBtn = (bool)mybtnElement .GetCurrentPropertyValue(AutomationElement.IsEnabledProperty); but in my case the button is always enabled therefore I need to check the Style applied to the button. Thank you very much. Best regards

    Read the article

  • how can i get notified on every control clicked in another application?

    - by Dizzy
    Hi all, Im writing an application that needs to get notified when a control in another application is clicked\invoked. How can i catch the click from my application? Here are some more related questions : Is UIAutomation can be a solution? is it working on unmanaged applications also? Is the Spy++ solution works also on managed applications? i'll be happy with any help.

    Read the article

  • Wake a Mac display from sleep via SSH

    - by MaxGabriel
    I'm using Jenkins as a CI server, where I'm SSHing into an iMac running OS X Mountain Lion (10.8.4) to run some UIAutomation integrations tests on an iOS app. The iMac actually sits 10 ft from me (but across a table) so I'm able to see the screen. However, the tests don't wake up the display, so I often can't see them. Is there a way to wake up the display from the terminal once Jenkins has SSHed in? So far I have tried using Applescript to press an arrow key, and using the Wake Assist application. I also tried setting the wake schedule to be the current date. Finally, I tried using the caffeinate command: caffeinate -t 300 &. The computer's "Wake for Wi-Fi access" checkbox is enabled. So far my best workaround is to just set the iMac to stay awake for atleast 3 hours. However, it'd be nice to keep normal sleep behavior, as I hypothesize that the screen waking from sleep would alert me visually that the integration tests are running. It's also significantly cooler :)

    Read the article

1