robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
168 stars 13 forks source link

[ENHANCEMENT] Handling of Set Library Search Order Keyword in Namespace Analysis #203

Open d-biehl opened 6 months ago

d-biehl commented 6 months ago

Description: Currently, RobotCode is unable to analyze the library search order in a file specified with Set Library Search Order. This limitation becomes apparent, especially when dealing with libraries containing keywords with identical names.

Enhancement Proposal: It is suggested to enhance the analysis of the library search order by taking into account the Set Library Search Order keyword.

burrk commented 1 month ago

Set Library Search Order is critical to creating object-oriented-ish libraries, such as Page Object Models (POM - libraries), where you want each page to obey common keywords.

There are RF page object frameworks based on both Python (e.g. robotframework-pageobjectlibrary and on RF script (e.g. the Page Modeler Chrome extension) which depend on this. Although those two examples are unfortunately no longer supported, POMs are still a common automation pattern.

Unless there is another simple way for testers to use polymorphism in RF for POMs (is there? e.g. not appending the page object name to every keyword) then it would be nice to have RobotCode support this automation pattern's use of Library Search Order. (or at least turn off all the duplicate keywords error messages for now: #267 :-) )