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
Currently it is not possible to import library multiple times with
different arguments using WITH NAME. Current implementation needs
refactoring to support reimports.
Currently reimporting is done in RemoteApplications by handling RF internals. It
would be great if we can publish this interface already in 2.1.3 release.
The original description is misleading because at least nowadays it is possible to import same library multiple times with different arguments and use WITH NAME syntax to assign different names for them. The attached examples shows how this works in practice. The example uses Import Library keyword but using Library setting works exactly same way.
It is still problem in some use cases that an imported library cannot change what keywords it implements.
There at least two different levels of reloading/reimporting.
One way of doing this is that the robot requests the implemented keywords again from the library, and updates the namespace. This would still keep the very same library instance in use. We can call this reloading.
Another one would be to do a full reimport, where the robot will create a new object instance from the library. I dont know if robot should then even recheck the library scope. This could then be called reimporting.
RemoteSwingLibrary would require the first kind of reloading and I think it should be enough for most cases. Therefore for now this issue will be about reloading a library and if necessary we can later create a separate issue about reimporting.
Activity
spooning commentedon Jun 29, 2014
Currently reimporting is done in RemoteApplications by handling RF internals. It
would be great if we can publish this interface already in 2.1.3 release.
spooning commentedon Jun 29, 2014
There are multiple ways to solve this issue. Let's design this properly on 2.5.
spooning commentedon Jun 29, 2014
Descoped from 2.5.
spooning commentedon Jun 29, 2014
Initially scoped for 2.6 release.
spooning commentedon Jun 29, 2014
Initially descoped from 2.6 and moved to 2.7.
spooning commentedon Jun 29, 2014
Initially descoped from 2.7 due to lack of time
spooning commentedon Jun 29, 2014
Issue 1546 has been merged into this issue.
spooning commentedon Jun 29, 2014
The original description is misleading because at least nowadays it is possible to import same library multiple times with different arguments and use WITH NAME syntax to assign different names for them. The attached examples shows how this works in practice. The example uses Import Library keyword but using Library setting works exactly same way.
It is still problem in some use cases that an imported library cannot change what keywords it implements.
edbrannin commentedon Sep 30, 2014
For posterity, here are the code samples from the original issue:
dynkws.py
dynkws.robot
[-]Reimporting Library[/-][+]Support reloading library[/+]pekkaklarck commentedon Nov 10, 2014
Issue MarketSquare/remoteswinglibrary#2 demonstrates why an API to reload libraries is needed. Let's finally implement this in RF 2.9.
jussimalinen commentedon Jun 4, 2015
There at least two different levels of reloading/reimporting.
One way of doing this is that the robot requests the implemented keywords again from the library, and updates the namespace. This would still keep the very same library instance in use. We can call this reloading.
Another one would be to do a full reimport, where the robot will create a new object instance from the library. I dont know if robot should then even recheck the library scope. This could then be called reimporting.
RemoteSwingLibrary would require the first kind of reloading and I think it should be enough for most cases. Therefore for now this issue will be about reloading a library and if necessary we can later create a separate issue about reimporting.
[-]Support reloading library[/-][+]BuiltIn: New `Reload Library` keyword[/+]