Run Keyword In Separate Thread keyword not found even though it's in the script

259 views Asked by At

I have a robot script with the following keywords:

Enter New Data Group
    SelectDialog  New Data Group
    Button Should Be Disabled  okButton
    Type Into Text Field  nameTextField  EnteredByRF1
    Type Into Text Field  descriptionTextArea  EnteredByRF1
    Button Should Be Enabled  okButton
    Push Button  okButton
    Run Keyword In Separate Thread  Check OverWrite

Check OverWrite
    SelectDialog  New Data Group
    Push Button  OK
    SelectDialog  New Data Group
    Push Button  Yes

When I run the script, it gets to the Run Keyword in Separate Thread and produces a Keyword Not found error. I understand from the docs that to handle a popup that may or may not appear, it needs to go in a separate thread. If I run it without the Separate Thread keyword, it works fine, IF the popup appears. No popup, it fails. How are you supposed to use this keyword? Is it the right solution for this test scenario?

1

There are 1 answers

0
AudioBubble On

After some experimentation, it appears Run Keyword In Separate Thread only works for pre-defined keywords in the SwingLibrary package.

By changing the sequence to:

Run Keyword In Separate Thread   SelectDialog  New Data Group
Run Keyword In Separate Thread   Push Button  OK
Run Keyword In Separate Thread   SelectDialog  New Data Group
Run Keyword In Separate Thread    Push Button  Yes

The RF script now works as expected.