Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: run_keyword() takes exactly 4 arguments (3 given) #45

Closed
hleskien opened this issue Dec 18, 2018 · 4 comments
Closed

TypeError: run_keyword() takes exactly 4 arguments (3 given) #45

hleskien opened this issue Dec 18, 2018 · 4 comments
Labels
Milestone

Comments

@hleskien
Copy link

hleskien commented Dec 18, 2018

The Keyword "Launch Application" fails with
TypeError: run_keyword() takes exactly 4 arguments (3 given)

This happens with versions 1.0.0 or 1.0.0.20181217.3.pre, with 0.0.0.20181204.3.pre everything was ok.

My setup is a bit complicated (White Library wrapped in PythonRemoteServer, tests run with Robot Framework Maven Plugin), but I believe the error also shows in a "normal" robot setup.

Robot Test file:

*** Settings ***
Library    Remote    http://127.0.0.1:8270
Suite Setup    Starte Editor
Suite Teardown    Beende Editor

*** Variables ***
${Nicht_speichern}    CommandButton_7

*** Keywords ***
Starte Editor
    Launch Application    C:\\Windows\\System32\\notepad.exe
    Attach Window    Unbenannt - Editor

Beende Editor
    #Close Application
    # bei Close Application geht anscheinend die Verbindung zur Anwendung verloren, so dass man keine Aktionen mehr ausführen kann
    Hold Special Key    ALT
    Press Special Key    F4
    Leave Special Key    ALT
    Sleep    1s
    Click Button    ${Nicht_speichern}

*** Test Cases ***
Hallo Welt
    [Documentation]    "Hallo Welt" in den Notepad-Editor schreiben
    Input Text To Textbox    15    Hallo Welt
    Verify Text In Textbox    15    Hallo Welt
    Sleep    3s

@eeter
Copy link
Contributor

eeter commented Dec 18, 2018

I was able to reproduce this with the PythonRemoteServer, Launch Application fails with "TypeError: run_keyword() missing 1 required positional argument: 'kwargs'". The error does not seem to occur with a direct library import.

Looks like there is an issue with run_keyword() in DynamicCore (it was not yet in use in 0.0.0.20181204.3.pre).

@hleskien
Copy link
Author

hleskien commented Jan 14, 2019

still happens with version 1.1.1

@eeter
Copy link
Contributor

eeter commented Jan 18, 2019

A fix has been merged to master and will be included in the next stable release. You can install the pre-release containing the fix with pip install -U --pre robotframework-whitelibrary.

@hleskien
Copy link
Author

Works. Thank you!

@eeter eeter added this to the 1.2.0 milestone Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants