-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value of variable '@{attributes}' is not list or list-like. #2513
Comments
You are correct the return type is always list of strings, even there is only one item in the list. I think it's better that keywords have only one return type, in this case a list. Because then one doesn't need write extra handling if user have a scenario where keyword can return zero or more elements. |
Posted by @4WvgqJu in a new issue.
|
@aaltat We actually have the current behaviour that Keywords that use it is done by |
Signed-off-by: René <snooz@posteo.de>
Signed-off-by: René <snooz@posteo.de>
…2522 #2523 #2530 - [x] fixed __init__.pyi file - [x] removed deprecated Keywords `Get Element State` & `Execute Javascript` - [x] fixed #2522 that clean_up of screenshots etc happens only once per robot run. - [x] fixed #2513 list getters always shall return lists - [x] removed support for direct values of `Fill Secret`, `Type Secret` and `httpCredentials` argument from `New Context` #2523 - [x] fixed New Context with recordVideo without size does not default to viewport. #2530 - [x] removed `videoSize` and `videoPath` arguments from `New Context` and `New Persistent Context` - [x] fixed #2214 recordVideo with New Persistent Context - [x] fixed #2215 New Persistent Context did not return Video Path
Describe the bug
My observation concerns function
Get Attribute Names
of libraryBrowser
. The error occurs when the script on the website examines the attributes of the elements with context HREF.To Reproduce
Run the code snippet with an appropriate website:
Expected behavior
The
Get Attribute Names
function does not change the data type from list to string if the list contains only one attribute name. Or in other words, the return value of the function is always the list data type even if the list contains only one element.Screenshots
Desktop (please complete the following information):
Additional context
I am now changing my paradigm to get around the behavior with the standard
Run Keyword If
function and an additional keyword for aFOR ... END
loop and case distinction. But that's work for me again! Once to identify the error and look for a solution. I would find it better if the data type is always list, if only one element.The text was updated successfully, but these errors were encountered: