You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chaining locators with lists does not work with Robot Framework 6.1 or above #1962
Giving chained locator as a list of locators seems not to work since Robot Framework 6.1.0. Tested with Chrome and Firefox using test web page and test case given below. The first chained locator with >> finds the element, but latter with list does not . With Robot Framework 6.0.1 works fine. Tested also with RF 7.4.1 and not working.
I did some research in the SeleniumLibrary's code, and problem seems to be with the type annotations of the keywords. For example:
<html>
<head>
<title>Locator Chain Test</title>
</head>
<body>
<button id="testElement">This is a test</button>
</body>
</html>
Example test case
*** Settings ***
Library SeleniumLibrary
*** Test Cases ***
Locator Chain Test
Open Browser [test_file_path] chrome
Click Element tag:body >> id:testElement
${locator_chain} Create List tag:body id:testElement
Click Element ${locator_chain}
Will take a look this morning. What version of pythonlibcore (robotframework-pythonlibcore) are you running? The latest is 4.5.0 released just this past week.
I think I am seeing the problem and yes it apopears to be the type annotation. I was temporarily confused because I know we had a test for this which was passing. Looking at the code who have just the one specific test, which should be good enough, but it was just the one keyword it uses, Page Should Contain Element, that has the type annotations fixed. Looks like most if not all other keywords with locators do not ..
Working on a solution now. Thanks for pointing this out @jjaakkola-atostek !
Activity
emanlove commentedon Jan 19, 2026
Will take a look this morning. What version of pythonlibcore (robotframework-pythonlibcore) are you running? The latest is 4.5.0 released just this past week.
jjaakkola-atostek commentedon Jan 19, 2026
Thank you! robotframework-pythonlibcore version is 4.5.0. I added it to the description.
emanlove commentedon Jan 19, 2026
I think I am seeing the problem and yes it apopears to be the type annotation. I was temporarily confused because I know we had a test for this which was passing. Looking at the code who have just the one specific test, which should be good enough, but it was just the one keyword it uses,
Page Should Contain Element, that has the type annotations fixed. Looks like most if not all other keywords with locators do not ..Working on a solution now. Thanks for pointing this out @jjaakkola-atostek !
Fix locator chaining with lists in Robot Framework 6.1+
emanlove commentedon Apr 26, 2026
Fixed in #1972