TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Federico Navarrete
NA
15
2.6k
UI Automation, Ribbon Control and Automation Anywhere 11
May 14 2019 1:44 PM
I am building a new bot in Automation Anywhere 11 and I have found recently a tricky situation when I'm trying to automate the Windows Ribbon.
If I have only one tab everything works as expected and I can identify all buttons inside, but if I have multiple tabs only the last tab elements are visible to the Object Cloning option, I have added unique Names, AutomationIDs, etc. And nothing has worked. This is a preview of the issue:
This is my example XAML code:
<
UserControl
x:Class
=
"Example.RibbonMenu"
xmlns
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x
=
"http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc
=
"http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d
=
"http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable
=
"d"
xmlns:my
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon"
>
<
my:Ribbon
x:Name
=
"R1"
AutomationProperties.AutomationId
=
"R1ID"
>
<
my:RibbonTab
Header
=
"Tab 1"
x:Name
=
"Tab1"
AutomationProperties.AutomationId
=
"Tab1ID"
>
<
my:RibbonGroup
x:Name
=
"GB1"
AutomationProperties.AutomationId
=
"RG1ID"
>
<
my:RibbonButton
Label
=
"Button 1"
x:Name
=
"RB1"
AutomationProperties.AutomationId
=
"RB1ID"
/>
</
my:RibbonGroup
>
</
my:RibbonTab
>
<
my:RibbonTab
Header
=
"Tab 2"
x:Name
=
"Tab2"
AutomationProperties.AutomationId
=
"Tab2ID"
>
<
my:RibbonGroup
x:Name
=
"RG2"
AutomationProperties.AutomationId
=
"RG2ID"
>
<
my:RibbonButton
Label
=
"Button 2"
x:Name
=
"RB2"
AutomationProperties.AutomationId
=
"RB2ID"
/>
<
my:RibbonButton
Label
=
"Button 3"
x:Name
=
"RB3"
AutomationProperties.AutomationId
=
"RB3ID"
/>
</
my:RibbonGroup
>
</
my:RibbonTab
>
</
my:Ribbon
>
</
UserControl
>
Also, I have read multiple options:
UI Automation and Ribbon control
XAML - Binding row and column index of cell to automation ID
Unable to generate Automation ID for WPF Controls, to be used by coded UI for automation testing
How can I find WPF controls by name or type?
Coded Ui test unable to find the WPF Ribbon button
How can i automate Ribbon UI
But nothing that I tried so far was worked until recently, I identified that the issue is connected to the last tab. Also, I tried the Legacy Option and Manage Windows Controls too. Here are some previews:
Legacy Option Enabled:
Manage Windows Controls:
Furthermore, another ribboned app like Paint where the buttons are recognized:
Does anyone have an idea how to fix it? Or has experienced something similar? Thanks for your help.
Reply
Answers (
0
)
How to make Car dashboad in WPF, pls help
Calculating percentage of left over cost displaying result a