Keyword 'xxx' expected 1 argument, got 0

Hi team!
Hope you’re doing all right and maybe some kind person has a minute or two to look into my issue.

So far the robot does what it suppoused to, I’m in the stage where it loops through all orders and prewievs the orders.

For some reason it shows error saying “Keyword ‘Fill the form for one robot’ expected 1 argument, got 0.” When i hover over the task it says “Mandatory argument missing: orders robotframework” But the order keywords are right there.

//////////////////////////////////////////////////////////////

*** Settings ***
Library     RPA.Browser.Selenium    auto_close=${FALSE}
Library     RPA.Excel.Files
Library     RPA.HTTP
Library     RPA.Windows
Library     RPA.Tables
Library     RPA.PDF
Library     RPA.Archive
Library     RPA.FileSystem
Library     RPA.Tasks


*** Variables ***
${URL}                      https://robotsparebinindustries.com/#/robot-order
${CSV_URL}                  https://robotsparebinindustries.com/orders.csv
${CSV_FILE}=                orders.csv
${GLOBAL_RETRY_AMOUNT}      30x
${GLOBAL_RETRY_INTERVAL}    0.5s


*** Tasks ***
Order robots from RobotSpareBin Industries Inc
    Open the robot order website
    Download the CSV file and submit the form in FORLOOP
    Fill the form for one robot
    Go to order another robot
    Store the receipt as a PDF file

    Close the Browser


*** Keywords ***
Open the robot order website
    Open Available Browser    ${URL}
    Wait Until Page Contains Element    css:.modal-content
    Click Button    OK

Download the CSV file and submit the form in FORLOOP
    Download    ${CSV_URL}    overwrite=True
    ${List_of_orders}=    Read table from CSV    ${CSV_FILE}    header=True
    Close Workbook
    FOR    ${orders}    IN    @{List_of_orders}
        Fill the form for one robot    ${orders}
        Submit the order
        Go to order another robot
    END

Fill the form for one robot
    [Arguments]    ${orders}
    Select From List By Value    id:head    ${orders}[Head]
    Input Text    xpath://*[@id="address"]    ${orders}[Address]
    Select Radio Button    body    ${orders}[Body]
    Input Text    xpath:/html/body/div/div/div[1]/div/div[1]/form/div[3]/input    ${orders}[Legs]
    Click Button    preview
    Wait Until Element Is Visible    robot-preview-image

Submit the order
    Click Button    id:order
    FOR    ${i}    IN RANGE    9999999
        ${success}=    RPA.Browser.Selenium.Is Element Visible    id:receipt
        IF    ${success}            BREAK
        Click Button    id:order
    END

Go to order another robot
    Wait Until Keyword Succeeds
    ...    ${GLOBAL_RETRY_AMOUNT}
    ...    ${GLOBAL_RETRY_INTERVAL}
    ...    Click button    order-another
    Wait Until Page Contains Element    css:.modal-content
    Click Button    OK


Close the Browser
    Close Browser

/////////////////////////////////////////////////////////////

You call keyword Fill the form for one robot in you tasks without input argument. In Download the CSV file and submit the form in FORLOOP you are calling it with input and it works.

Hi, thankyou for your kind reply.
I dont know what should I do next. Can you please give me more spesific suggestions?

I tried to add ${orders} to keyword Fill the form for one robot in tasks and also [Arguments] ${orders} but it didnt do the trick.

Seems your keyword Download the CSV file and submit the form in FORLOOP is already doing the order filling? In that case you can remove following Fill the form for one robot from tasks.

Yes it worked. Thank you for explaining. I have a bit better understanding how calling keywords works.