Topic for comments about Browser library keyword Get Elements
Hello!
I have an issue with Get Element keyword in robotframework-browser 17.5.2 version.
Before that on our project we used version 16.3.0 and Get Elements keyword returned a list with some references on the elements, like: ['element=e3f17177-2cd1-4018-8661-a8b0a05f75c6', 'element=64260a05-9ec9-4e6f-8293-7838fe97027b', 'element=d4054c8c-9253-4191-8f08-768ff3c37f4e', 'element=22e5554a-d022-4ce7-9aed-e65a2b3adb06']
and so on.
After that we iterated on this list, got the element and as I understand, when we got an element from the list this reference converted to the xpath locator. After that we catenate this xpath locator and another one, to got new unique locator to found needed element on the page.
But now, in new version 17.5.2 Get Elements keyword returned a list with the locators, not with the references. It looks like: Found locator('xpath=//*[@class="status-label status-label--active"]/../..').first(),locator('xpath=//*[@class="status-label status-label--active"]/../..').nth(1),locator('xpath=//*[@class="status-label status-label--active"]/../..').nth(2),locator('xpath=//*[@class="status-label status-label--active"]/../..').nth(3)
. And now when we are trying to iterate by this list, get an element’s xpath and add to this xpath another one we have a problem. Because when we are using catenate or trying to concatenate two different locators in any way, we got such locator as waiting for locator('xpath=//*[@class="status-label status-label--active"]/../..').nth(9//*[@class="table-main__actions-list table-main__actions-list--visible"])
.
Is there any way to fix it? Or maybe there is some workaround? Because we have a lot of tests that are using “compount” xpath selectors.
Could you please help?