robotframework/RIDE

Issue with 'Run Keywords' in Teardown Section: Subsequent Keywords Misplaced upon Reopening RIDE

didiyou opened this issue · 15 comments

When using the "Run Keywords" command within the Teardown section of a test to execute multiple keywords, I encounter an issue where, after saving and closing RIDE, reopening the suite results in only the first keyword remaining in the Teardown section. The subsequent keywords are incorrectly moved to the test case section.

Steps to reproduce:

  1. Create a test case in RIDE.
  2. In the Teardown section, use "Run Keywords" to specify multiple keywords (e.g., "Keyword1" AND "Keyword2" AND "Keyword3").
  3. Save the test case and close RIDE.
  4. Reopen RIDE and navigate to the same test case.

Expected behavior: All keywords specified after "Run Keywords" should remain in the Teardown section.

Actual behavior: Only the first keyword ("Keyword1") remains in the Teardown section, while the rest ("Keyword2", "Keyword3", ...) are moved to the main content of the test case.

This issue affects the organization of the test cases and how the Teardown is executed. I would appreciate a resolution or any guidance on this matter. Thank you.

@didiyou You did not mention the version of RIDE and Python. This bug is fixed in current development version, v2.1dev41 (if your Python is greater or equal to 3.8).

I attach a test suite created with the workflow you described:
test_teardown_format.robot.txt

In the Changelog, you can see the fix entry:
Fixed wrong continuation of long chains of keywords in Setups, Teardowns or Documentation

Do I need to upgrade the python version? Can it be solved by just upgrading the RF version?

Where is the RIDE version?

@didiyou You did not mention the version of RIDE and Python. This bug is fixed in current development version, v2.1dev41 (if your Python is greater or equal to 3.8).

I attach a test suite created with the workflow you described: test_teardown_format.robot.txt

In the Changelog, you can see the fix entry: Fixed wrong continuation of long chains of keywords in Setups, Teardowns or Documentation
my version is:
企业微信截图_1717038378278
企业微信截图_17170383954247
but this issue is still exists...

@didiyou You can install the development version using the pip command you can see in the Code page here, or in the Release Notes in the Help menu.

@didiyou You can install the development version using the pip command you can see in the Code page here, or in the Release Notes in the Help menu.

Yeah, this dev version has fixed the issue. By the way, any idea when the official release is coming out?

any idea when the official release is coming out?

Next week I will release first Beta.

any idea when the official release is coming out?

Next week I will release first Beta.

During use, I discovered several points that can easily cause the software to crash

  1. Click here, and the software will crash
    企业微信截图_17175800497198
  2. When I enter a newline in a cell

additionally, so after I upgraded to this development version, my Windows computer keeps blue screening and restarting. Do you think this could be because of the update?

@didiyou

Click here, and the software will crash
This is new for me, I'll see If I can reproduce. (need to know your Python and wxPython versions).

When I enter a newline in a cell
This may be related with a problem in Windows and I made a fix for this. You need to edit your settings.cfg, and set to False in the [Grid] section this setting:

# filter newlines: When enabled, newlines are not shown as \n in the cells. On Windows this may cause a lock.
filter newlines = False

This could also be the fix for your first problem.

I don't know the cause of blue screens in your Windows machine. Could be many things, maybe related with graphic drivers, or low memory, if wxPython is doing some intense graphics use.
See if the fix I mention, solves the problems, and if the blue screens stop appearing we can say that there was some high probability of they being caused by RIDE/wxPython/Python.

@didiyou

Click here, and the software will crash
This is new for me, I'll see If I can reproduce. (need to know your Python and wxPython versions).

When I enter a newline in a cell
This may be related with a problem in Windows and I made a fix for this. You need to edit your settings.cfg, and set to False in the [Grid] section this setting:

# filter newlines: When enabled, newlines are not shown as \n in the cells. On Windows this may cause a lock.
filter newlines = False

This could also be the fix for your first problem.

I don't know the cause of blue screens in your Windows machine. Could be many things, maybe related with graphic drivers, or low memory, if wxPython is doing some intense graphics use. See if the fix I mention, solves the problems, and if the blue screens stop appearing we can say that there was some high probability of they being caused by RIDE/wxPython/Python.

python--3.8.5
wxPython--4.2.1
now the newlines in the settings.cfg is False, this problem remains exist.
Uploading image.png…

By the way,this development version of the editor changes my formatting. In the run keyword if ... else statement, it modifies the format of the else part, like this:
企业微信截图_17175863676798

@didiyou

By the way,this development version of the editor changes my formatting. In the run keyword if ... else statement, it modifies the format of the else part, like this:

Yes, it does. See #2790

(good that users find and report problems. better have them duplicated, than not have them)

@didiyou

By the way,this development version of the editor changes my formatting. In the run keyword if ... else statement, it modifies the format of the else part, like this:

Yes, it does. See #2790

(good that users find and report problems. better have them duplicated, than not have them)

Is there a better solution? Do you mean all conditional branches need to be written on one line?

Is there a better solution? Do you mean all conditional branches need to be written on one line?

No, that is a workaround until the bug is fixed. Just be aware of the problem and how to avoid breaking the test.

Is there a better solution? Do you mean all conditional branches need to be written on one line?

No, that is a workaround until the bug is fixed. Just be aware of the problem and how to avoid breaking the test.

So will the beta version next week fix this error?

Please try current development version, v2.1dev50.