Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

robot framework, expected 0 arguments got 2

I have the following code:

Original Crear Variable Experto
[Documentation]
Consultar RUT existente
[Arguments] ${argumentorut}     
[Tags]    PersonalInformation()      
${var_object}=      Create Wsdl Object              ${SERVICE_NAME}               En Experto Original es ns0:VARInput

Set Wsdl Object Attribute          ${var_object}          rut          ${argumentorut}

    Set Soap Headers                  ${var_object}            
    Set Location                      ${SECURE WS URL}
    [Return]       ${var_object}

And I'm instantiating it

WS Experto Original Consulta y Respuesta
[Documentation]      Envía consulta válida a WS Experto Original y obtiene respuesta
[Arguments]          ${param_rutsindf}

Run Keyword If       ${SET_LOGGING}       Log        ${URL_ORIG}

Create Soap Client   ${URL_ORIG}

Se crean las variables usando los valores almacenados en listas.
${var_RUT}=         Original Crear Variable Experto    ${RUT_EXISTE1}    ${param_rutsindf}


${list}= Create List   ${var_RUT}



${obj}=         Create Wsdl Object          ${SERVICE_NAME}            # En Experto Original es ns0:SRUTInput
Set Wsdl Object Attribute       ${obj}         rut                  ${list}


Set Location         ${URL_ORIG}

Retorna un string ASCII soap.
${RESULT}=       Call Soap Method        personalInformation     ${list}      METODO DEL WEB SERVICE 
Set Global Variable        ${RESULT}
[Return]

My error:

Keyword 'Resourse.Original Crear Variable Experto' expected 0 arguments, got 2

Can someone explain to me why I am getting this error?

like image 738
Alan Avatar asked Jul 25 '26 05:07

Alan


1 Answers

You don't have two or more spaces after [Arguments] in the definition of Original Crear Variable Experto. Therefore, robot doesn't think that keyword accepts any arguments.

Change this:

[Arguments] ${argumentorut} 

To this:

[Arguments]  ${argumentorut} 

If you fix that, you appear to have another problem. You are calling the keyword with two arguments, but the keyword accepts only one. I don't know if the bug is that you're sending too many, or that you're expecting too few.

like image 176
Bryan Oakley Avatar answered Jul 28 '26 07:07

Bryan Oakley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!