Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8902233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:33:39+00:00 2026-06-15T01:33:39+00:00

Tried every listed option but cannot find Ribbon within a Pane control using White.

  • 0

Tried every listed option but cannot find Ribbon within a Pane control using White.
Although VisualUIAVerify shows it in a tree.

"window" "Test 0.0.1" "MainForm"
  |--"pane" "Dock Top" "_MainForm_Toolbars_Dock_Area_Top"
    |--"" "Ribbon" ""
      |--"tab" "Ribbon Tabs" ""
        |--"tab item" "Tools" ""

I want to automate click on tab item “Tools”.
but can find only a “pane”

import clr
import sys
sys.path.append(r"C:\TEMP\white")
clr.AddReference("White.Core")
clr.AddReference("White.NUnit")
from White.NUnit import *
from White import *
from White.Core import *
from White.Core.Configuration import *
from White.Core.UIItems import *
from White.Core.UIItems.WindowItems import *
from White.Core.UIItems.ListBoxItems import *
from White.Core.UIItems.Container import *
from White.Core.UIItems.Finders import *
from White.Core.Factory import *
from White.Core.Finder import *
from White.Core.AutomationElementSearch import *
from White.Core.WindowsAPI import *

from System.Diagnostics import Process
wp= Process();
wp.StartInfo.FileName = r"c:\TEMP\gui\TestShell.exe";
wp.StartInfo.Arguments = r"TestShell.taco -e DBA -s qa";        
wp.Start();
wapp = Application.Attach( wp );
wnds=Application.GetWindows(wapp)
wnd=wnds[0]

#test
>wnd.Name
"Test 0.0.1"

I can even click tab Tools provided coordinates (IronPython).

def click(cp,mouse,x,y):
    cp = wnd.Bounds.TopLeft;
    cp.Offset(x, y);
    mouse = Desktop.Instance.Mouse;
    mouse.Location = cp;
    mouse.Click(cp);

cp = wnd.Bounds.TopLeft;
mouse = Desktop.Instance.Mouse;
mouse.Location = cp;
mouse.Click(cp);
click(cp,mouse,120,50) #tools

Getting to a pane:

pn=wnd.GetElement(SearchCriteria.ByAutomationId("_MainForm_Toolbars_Dock_Area_Top"));

tying to find a ribbon

rbn=pn.GetElement(SearchCriteria.ByAutomationId("Ribbon"));

or find all children

pn.FindAll(TreeScope.Children,  Condition.TrueCondition)

Nothing seems to work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:33:42+00:00Added an answer on June 15, 2026 at 1:33 am

    The inconsistencies you’re seeing are likely the result of the fact that UIA Verify is using the native COM version of the UIA library and white still uses the old managed library.

    In my experience, the native library tends to be faster, more stable, and more compatible than the older managed library, so you should consider transitioning your code over to using it (or if you’re feeling generous, contributing code to white on GitHub to update it).

    It’s been a while since I’ve done that migration myself, so I can’t recall the specifics, but basically you’ll need to produce an interop DLL that will allow your .NET application to call the native UIA methods. Then you can optionally create your own wrapper library or possibly use one of those mentioned below.

    I’d recommend referring to these for help in making the transition:

    UI Automation COM-to-.NET Adapter – An early attempt at creating a wrapper for the COM API. I had trouble just straight up using this, but it was helpful to take a look at initially. Also search for some of the MSDN support forum posts about the COM API made by this wrapper’s developer. I unfortunately can’t link to them because of my low StackOverflow rep (long time lurker, first time answerer).

    UIA Verify Source Code – You can see that they have in their source code a UIAComWrapper which is used to access the COM interface. You can also take a look in that project at how they’re producing the interop DLL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried making every div 75px and the table within the div but
I tried using arrays but I don't need every single element, and so it
I have tried almost every IDE listed here , but none of them provide
I have tried every way I can think of with this, but just not
I've tried every combination to import binary data for Mongo and I CANNOT get
I have looked on here and tried every answer available, but it is still
I tried decoding this base64 string so many times but every time i get
I think I've tried every combination, but I can't get the alpha keyboard to
I've read every post I can find about this but nothing is working. I'm
I have tried every install method I can think of to install RPy2 on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.