Skip to content

[BUG] Only keywords from first defined keyword server found #599

@lmensch

Description

@lmensch

Describe the bug
Robotcode cannot find all the keywords, which are available on my remote (local machine) keyword server.
Only the keywords of the first defined keyword server are found. Any following keyword servers are ignored.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Start a robotremoteserver on your local machine on port 8270
  2. Start a robotremoteserver on your local machine on port 8271
  3. Specify the remote keyword servers in the settings section
  4. Try to access the keywords for both keyword servers and try switching the order/position of the two keyword servers

For your keyword server you can use this code:

from robotremoteserver import RobotRemoteServer

class RemoteKeywords:
    def __init__(self):
        pass

    @staticmethod
    def first_localhost_log(message: str):
        """Log the message to stdout"""
        print(message)

RobotRemoteServer(RemoteKeywords, host='127.0.0.1', port=8270)
from robotremoteserver import RobotRemoteServer

class RemoteKeywords:
    def __init__(self):
        pass

    @staticmethod
    def second_localhost_log(message: str):
        """Log the message to stdout"""
        print(message)

RobotRemoteServer(RemoteKeywords, host='127.0.0.1', port=8271)
*** Settings ***
Library    Remote    http://127.0.0.1:8270    WITH NAME    FirstServer
Library    Remote    http://127.0.0.1:8271    WITH NAME    SecondServer


*** Test Cases ***
Test Remote Keyword Access
    FirstServer.First Localhost Log    First import
    SecondServer.Second Localhost log    Second import

Expected behavior
Both keywords should be found, regardless of the order in which i define my keyword servers,

Screenshots
Image

Image

Logs
There were no interesting logs there.

Additional context
I found out that the order is crucial for robotcode to find the keywords. Only the keywords of the first defined keyword server are found. The keywords of all following keyword servers are ignored.

Desktop:

  • VS Code Version 1.116.0
  • RobotCode Version 2.5.1
  • OS: Windows
  • Python Version 3.11.6
  • RobotFramework Version 7.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions