-
Notifications
You must be signed in to change notification settings - Fork 12
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
Not taking screenshots on failure when setting custom name #206
Comments
Intresting behavior i will look into this next week how to fix custom libray names. Expected behavior should be that of cours libname comparsion should FLA not FlaUILibrary |
Alias usage can not be obtained directly from python code. So i will create a new parameter alias which can be set For example Library FlaUILibrary screenshot_on_failure=True screenshot_dir=${FAILURE_IMG_DIR} alias=FLA AS FLA afterwards i will use this alias. By default it will be FlaUILibrary |
I was using this feature to be honest even before this last merge and it was functioning well.
@Abuturku what was the robot version you were testing with with the code i will provid is totally fine and working well. |
According to https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#toc-entry-314 you can set a custom name for libraries when importing them, for example:
Library FlaUILibrary screenshot_on_failure=True screenshot_dir=${FAILURE_IMG_DIR} AS FLA
Now I think the issue is caused by this check in _end_keyword in src/FlaUILibrary/__init.py__ in line 165
attrs['libname'] == "FlaUILibrary"
It seems as if Robot Framework is overwriting the libname attribute with the custom name. When debugging I added a line to print out the attrs variable and it showed:
'libname': 'FLA'
The text was updated successfully, but these errors were encountered: