Describe the bug
Using FOR loop to iterate "Elements" "Get BoundingBox" gives error.
This worked before when using "older" versions. After updating to latest version of Python, Robot framework, Browser, etc this issue arose. See below overview of exact "old" and "new" versions:
To Reproduce
Environment:
This mainly happens in the test auto test framework I use, it is for me not certain if this also occurs in other setups.
Steps to reproduce the behavior:
Run "Get Elements" in a way it gives more than 1 results
Use FOR loop to iterate the elements to find the boundingbox of the elements
When the list of elements contains more than 1 element in the list than there is a error: TypeError: 'NoneType' object is not iterable". I also added a image of the error.
Relevant code in our test framework:
${elements}= Get Elements ${selector}
FOR ${element} IN @{elements}
${box}= Get BoundingBox ${element}
IF ${box}
Append To List ${bounded_elements} ${element}
END
END
RETURN ${bounded_elements}
Expected behavior
That it iterates all elements that are in the list
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Describe the bug Using FOR loop to iterate "Elements" "Get BoundingBox" gives error.
This worked before when using "older" versions. After updating to latest version of Python, Robot framework, Browser, etc this issue arose. See below overview of exact "old" and "new" versions:
Python: 3.9 → 3.12 Robotframework: 4.1.1 → 7.0 Robotframework-browser: 8.0.2 → 18.5.1
For more information see Robot framework Slack: https://robotframework.slack.com/archives/C015KB1QSDN/p1717657032495999
Print screen of debug log
To Reproduce Environment: This mainly happens in the test auto test framework I use, it is for me not certain if this also occurs in other setups.
Steps to reproduce the behavior:
Relevant code in our test framework: ${elements}= Get Elements ${selector} FOR ${element} IN @{elements} ${box}= Get BoundingBox ${element} IF ${box} Append To List ${bounded_elements} ${element} END END RETURN ${bounded_elements}
Expected behavior That it iterates all elements that are in the list
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.