RPA.Windows name attribute has a space

Hi, I would need help with automating a Windows app, namely a mock CRM app that can be downloaded here : Learn RPA on Youtube!

I need to click on the “Company” tab highlighted in this screenshot

image

I have tried printing the tree with the use of the Print Tree keyword, and I have found that the Name property of the tab contains a space.

2-3. $ControlType: TabItemControl    ClassName:     AutomationId:     Rect: (3415,212,3474,230)[59x18]    Name: 'Company '    Handle: 0x0(0)

I can’t manage to select it, other tabs work fine, because they don’t have a space.
I have tried using the following selectors, but none work :

Click    type:TabItemControl name:"Company "

OR

Click    type:TabItemControl name:'Company '

I have looked in the doc, but I can’t find how I could select this, my guess would be regex, but it does not work either, I get the error message
error: nothing to repeat at position 0

Thanks for your help

Hi Gaël,

Sorry for my late reply, I think the problem is that Robot Framework interprets the space at the end of ‘Company’ as a division between attributes.

The following piece of code works:
Click[tab]type:TabItemControl regex:“Company*”

2 Likes