Multiple keywords matching for internal resource imports when using ${CURDIR} in relative path

Im currently getting an error message for multiple keywords matching for internal resource imports, example:

Common.robot
*** Keywords ***
print something log to console message

Library1.robot
*** Settings ***
Resource ${CURDIR}/../common.robot

Library2.robot
*** Settings ***
Resource ${CURDIR}/../common.robot

TestCase.robot
*** Settings ***
Resource ${CURDIR}/../Library1.robot
Resource ${CURDIR}/../Library2.robot

*** Test Cases ***
Test case 1
print something ← this is where the error is shown
forum1

In this case “print something” will show an error saying multiple keywords matching even tho its only one keyword but internally called within the imports.

When executing RF is able to resolve and executes normally without issue but the error is always present in VScode.

Is there a way to fix this so I dont have to see the error without adding exceptions to lint because I wanna see any real multiple keywords exceptions

NOTE: if I use standard path notation like ../Library1.robot the error doesnt appear anymore, however since we want to execute from different places we are using ${CURDIR} so the library imports are more stable.

Currently using robotframework 6.1.1
IDE: vs code

Where do you get the error? Does the test fail?

Hi I just updated the question with more information, the test does not fail, its only visually showing me an error on the IDE but when executed works normally

So it is a “problem” in VS Code. I can’t help you on that.
If it was on RIDE, I could :wink:

1 Like