Get Elements keyword returning 0 because it does not wait element attached state.
See original GitHub issueDescribe the bug
When searching a webpage for multiple elements of the same type (e.g. checkbox) to use in a random selector we get the error 0 elements of type =checkbox
. But when we us Get Element
with the same search criteria we get the error found 3 elements of type checkbox
To Reproduce Steps to reproduce the behavior:
- Search a webpage that has multiple elements/attributes of the same type
- Using
Get Elements
try to get them to return as a list - Get the error
0 elements of type =<what you are searching for>
Expected behavior
This works in version 6.0.0 which was the version we have been using from August until October (upgraded to 10.0.1 on Nov 1st)
Expecting the Get Elements
keyword to return a list of elements of the given type which will allow us to use these in the further steps of our test e.g. Click a random checkbox from the returned list
Desktop (please complete the following information):
- OS: MacOS 11.6
- Chrome
- Version 95.0.4638.54
- RobotFramework Version 4.1.2
Additional context As we are automating an internal web application I am not able to supply links or snippets of code due to security constraints. But please let me know if there is anything I can add here that could help with this issue
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
@aaltat
I’ve put up a pull request to add @GavinRodgers-EN0055! 🎉
Ah, I think I know what is wrong, before 10.x release, Get Element(s) keywords did wait that at least one element is in attached state. But in 10.x release we do not anymore wait that and this is a regression bug.
Need to think how to reproduce the problem and fix it.