Git Product home page Git Product logo

teststack / uiacomwrapper Goto Github PK

View Code? Open in Web Editor NEW
74.0 74.0 49.0 4.24 MB

The UI Automation COM-to-.NET Adapter makes it possible to use the new Windows Automation API 3.0 COM interfaces, with their improved reliability and performance, while still using the same System.Windows.Automation classes as in earlier versions of UI Automation

License: Microsoft Public License

C# 99.91% PowerShell 0.09%

uiacomwrapper's People

Contributors

ivan-danilov avatar jakeginnivan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uiacomwrapper's Issues

How to close Page Tab under _tabControl

Hello,
I have a mainTab(_tabControl) under this couple of child tabs(PageTabs) ,am able to keep focus and select the required tab but problem is not able to close that opened page tab,each tab is having close button but when i use UI verify,the page tab is getting identified but not 'x' button. i tried to see childs ,ascendants using treewalker but no luck,

can any one help me how perform action to close page tab using White/UIACOM Wrapper/UI Automation?
my application:
Windows form,Infragistics controls,

NOTE: here am using TreeWalker ,since using White framework am not able to identify tabs or Grids or menubar or trees. its because my application controls are using 3rd party Infragistics controls.

Issue in finding some of the windows apps with Blazor component

Hi Team,

I have an Diagnostic app, which is not able to identify the controls in it through Treeview walker, it wont even identify that window at from the list of windows.

From UI verify tool also it shows excption and on click of continue it shows, the exception from UIA verify tool is attached here for your reference : Attached UIAVerify-Error-Log.txt file

The developers of the tool told that that tool is developed and they told that "they render a Blazor Application using a WPF Blazor control".

So in UIAComwrapper wont identify blazor application? If we wanto to find controls in it how to use UIAcomwrapper?

#region Assembly UIAComWrapper, Version=1.1.0.14, Culture=neutral, PublicKeyToken=78cbcf77433a85e5
// C:\Users\KumarSiv\source\repos\GFriend\ExternalLibraries\UIAComWrapper.dll
#endregion

public sealed class TreeWalker 

     TreeWalker tw = TreeWalker.ControlViewWalker;
        if (rootElement == null)
        {
            rootElement = AutomationElement.RootElement;
        }
        AutomationElement window = tw.GetFirstChild(rootElement);

UIAVerify-Error-Log.txt

Windows Explorer crashes when subscribing to structure changed events on the RootElement

Registering for StructureChangedEvents on the RootElement, with the TreeScope of Children will cause Windows Explorer to crash intermittently. I have been able to reliably cause a crash by either navigating between network drives in Windows Explorer, or more reliably by right clicking the desktop -> Personalize -> Desktop Background and clicking the drop down "Picture Position". The crash occurs at the same location every time no matter how it is reproduced in Windows Explorer, in DUI70.dll, with the same offset every time, with an AccessViolationException. When attached to Explorer.exe in visual studio, I was able to download the public symbols for DUI70.dll and when the exception occured the function that DUI70.dll was currently executing was "RaiseStructureChangeEvent". I was only able to view function headers and the rest of disassembly.

Is anyone else able to reproduce this and have some insight as to what may be causing it? This was tested on Windows 7. We do not have any Windows 8 or Windows 10 machines that are currently in use, so I am not sure if they can be reproduced on those operating systems.

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            SubscribeForStructureChanged();
        }

        public static void SubscribeForStructureChanged()
        {
            try
            {
                Automation.AddStructureChangedEventHandler(
                    AutomationElement.RootElement,
                    TreeScope.Children,
                    new StructureChangedEventHandler(OnStructureChanged));

                while(true)
                {
                    System.Threading.Thread.Yield();
                }
            }
            catch (ElementNotAvailableException) { }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }                   
        }

        private static void OnStructureChanged(object sender, StructureChangedEventArgs e)
        {
            return;
        }
    }
}

Getting property accValue of IAccessible throws an error.

Getting property accValue of IAccessible throws an error:
Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

using System.Windows.Automation;

public object GetValue(AutomationElement element){
            object patternObj;
            if (element.TryGetCurrentPattern(LegacyIAccessiblePattern.Pattern, out patternObj))
            {
                var legacyIAccessiblePattern = (LegacyIAccessiblePattern)patternObj;
                var iAccessible = legacyIAccessiblePattern.GetIAccessible();

                if (iAccessible != null)
                {
                    result = iAccessible.accValue; // ERROR HERE
                }
            }
            return Accessible.accValue;
}

ScrollPattern.ScrollVertical() for WinForms UserControl do not work correctly

Hi to all!
I have a problem: scrolling for UserControl work for first step only, all next steps are ignore.
I do not get any Error in this situation.
How can I fix it?
Thank in advance!

On Application side:

        var aaa = new UserControl();
        aaa.Location = new Point(200, 0);
        aaa.Name = "BedSideReview";
        aaa.Size = new Size(400, 400);
        aaa.AutoScroll = true;
        this.tabPage1.Controls.Add(aaa);

        var bbb = new DataGridView();
        bbb.MinimumSize = new Size(400, 400);
        bbb.Size = new Size(400, 400);
        aaa.Controls.Add(bbb);

        var ccc = new DataGridView();
        ccc.Location = new Point(0, 400);
        ccc.MinimumSize = new Size(400, 400);
        ccc.Size = new Size(400, 400);
        aaa.Controls.Add(ccc);

On Automation side:

        var scrollPattern = GetPattern<ScrollPattern>(uiControl.GetCurrentPattern(ScrollPattern.Pattern));
        scrollPattern.ScrollVertical(ScrollAmount.SmallIncrement);

Select entire row of a data grid view

Uisng Treewalker ,i am able to get required row number from the grid but not able to select that row.

i have tried selection,invoke, and other pattern but everything is throwing error like un supported pattern.
myrow=2 //example
// to get row element)
AutomationElement rowElementToSelect = requiredGrid.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.AutomationIdProperty, myrow.ToString()));

// get row header
AutomationElement rowHeader = rowElementToSelect.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Header));

// invoke it (select the whole line)
//((InvokePattern)rowHeader.GetCurrentPattern(InvokePattern.Pattern)).Invoke();

Environment: Windows forms,Infragistics,.netframework 4,

Can any one help to get the solution for this scenario?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.