RPA.Windows problem to define locator with space in the name

Hello ! I am still working on my testcase “KeePass” (initial issue #806)
I have move to Python for the solution because in this case it seems to be easier.
But still I have some problems:

One is to define the locator for the group out of the list.
if I use

            grp_name = "name:" + grp_elem.name + " depth:16"
            print("group_name=", grp_name)
            lib.click(grp_name)

all groups are working fine if there is no space in the name (ProblemName1.zip file log.txt).

If I use

            grp_name = "name:'" + grp_elem.name + "' depth:16"
            print("group_name=", grp_name)
            lib.click(grp_name)

none of the groups is working as you can see in ProblemName2.zip file log.txt

I have enclosed the program KeePassV2 and the logfile py.log
ProblemName2.zip (16.7 KB)
ProblemName1.zip (44.7 KB)

You might need to switch your code to

            grp_name = 'name:"' + grp_elem.name + '" depth:16'
            print("group_name=", grp_name)
            lib.click(grp_name)

Discussion on locators on Slack

1 Like

Thank you for your solution. I am sorry that I did not try to switch the ’ and ".
I could not sign in in slack. I think my mailbox did not accept the message with the code to sign in.
But now I know that RPA treats ’ and " not euqually.

If it worked out for you could you mark this as solution? And sorry that its not that clear from documentation, we will work on improving that.

1 Like

thank you for your solution

1 Like