-
Notifications
You must be signed in to change notification settings - Fork 383
F.A.Q.
A place to have questions and solutions.
A: You have to disable auto-correction in MacOS System Preferences. See Issue #1949
2. Q: In the newest versions of RIDE (1.7.4) and with Robot Framework 3.1.2, when I edit a Test Suite having : FOR
, then, when is executed, appears the following error: FOR loop contains no keywords.
. How to fix this?
A: Robot Framework is tolerant to the old : FOR
format, and the test suite can be executed correctly. However, when the file is edited in RIDE, it looses the old style formatting, so you must add the terminating END
.
In the next images you can see how is shown the old and new styles (the Code Editor is showing the file not formatted):
Then it must be changed to:
3. Q: I installed RIDE, on Python 3.7 but it does not start, see below the error. How to start RIDE?
C:\>ride
Traceback (most recent call last):
File "C:\Program Files\Python37\Scripts\ride.py", line 21, in <module>
from robotide import main
ImportError: No module named robotide
A: A possible way to start RIDE is:
python -m robotide.__init__
You can then go to Tools>Create RIDE Desktop Shortcut
, or run the shortcut creation script with:
python -m robotide.postinstall -install
4. Q: How can I preserve the Log.html and Report.html from different test runs, preferably with a timestamp?
A: You should use the robot
option for the output directory (-d
) in the arguments text field. See
Issue #1891
See below an example for Windows, using date formatting in the current test directory:
-d ./%date:~-4,4%%date:~-10,2%%date:~-7,2%
The similar result in Linux or MacOS can be obtained with the date
command:
-d `date +%F_%X`
5. Q: On Windows, when running test suites with Asian characters on filenames or paths, the Output and Log panels show those characters with ??
. How to fix?
A: The problem happens because Windows does not use UTF-8 encoding (there are many different encodings), we don't have an easy solution to fix. You can create a command file, for example, C:\Python37\Scripts\ride.cmd
with the following content:
@echo off
set PYTHONIOENCODING=UTF-8
C:\Python37\python.exe -m robotide.__init__ %*
A: RIDE (currently version 1.7.4.1), is not compatible with Python 3.8. See the Issues with the tag Python 3.8.
A: Next version of RIDE, 2.0b1 or current development from master
will support Python 3.8.
A: Robot installation instructions
RIDE runs only on the regular Python, not on Jython nor IronPython. Python 2.7 is the
minimum version. but RIDE 1.7.4 is the last version supporting Python 2.7. Please consider
upgrading to Python 3.6 or 3.7. Python 3.8 WILL ONLY BE SUPPORTED ON FUTURE RIDE 2.0.
Most other operating systems than Windows have a recent enough Python installed by default.
CentOS 7 that comes from OpenStack already has Python 2.7.5 installed. To verify,
open a terminal and type the following:
python --version
Enable Software Collections (SCL) Software Collections, also known as SCL is a community project that allows you to build, install, and use multiple versions of software on the same system, without affecting system default packages. By enabling SCL you will gain access to the newer versions of programming languages and services which are not available in the core repositories. CentOS 7 ships with Python 2.7.5 which is a critical part of the CentOS base system. SCL allows you to install newer versions of python 3.x alongside the default python v2.7.5 so that system tools such as yum will continue to work properly. To enable SCL, you need to install the CentOS SCL release file. It is part of the CentOS extras repository and can be installed by running the following command:
sudo yum install centos-release-scl
Now that you have access to the SCL repository, you can install any Python 3.x version you need.
In this tutorial, we will install Python 3.6, which is the most stable version
available and because there is a wxPython package for that version for
RobotFramework/RIDE use at the time of writing. To do so type the
following command on your CentOS 7 terminal:
sudo yum install rh-python36
yum install python3-libs
Once the package rh-python36 is installed, check the Python version by typing:
python --version
Python 2.7.5
You will notice that Python 2.7 is the default Python version in your current shell. To access Python 3.6 you need to launch a new shell instance using the Software Collection scl tool:
alias python=python3
scl enable rh-python36 bash
What the command above does is calling the script /opt/rh/rh-python36/enable, which
changes the shell environment variables.
If you check the Python version again, you’ll notice that Python 3.6 is the default
version in your current shell now.
python --version
Python 3.6.9
It is important to point out that Python 3.6 is set as the default Python version only in this shell session. If you exit the session or open a new session from another terminal Python 2.7 will be the default Python version. A simple safe way making this version permanent would be to use an alias. Place this into ~/.bashrc or ~/.bash_aliases file:
alias python=python3
RIDE's GUI is implemented using wxPython toolkit.
RIDE and wxPython requires a graphical system like Gnome, KDE, X11.
When installing wxPython, there are a series of requirements that should be
installed automatically, but in some cases is better to install them before. For
example, numpy under Python 2.7, requires version 1.16.1, and it can be installed
before installing RIDE:
yum groupinstall "GNOME Desktop" -y
yum install SDL
pip install numpy==1.16.1
On Linux is better to install wxPython before installing RIDE. This is because the
correct package should be downloaded or installed directly from wxPython. Otherwise,
the system will try to build the installation package and this takes time and not
always succeeds. At the time of this writing, you should use:
python3 -m pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk2/centos-7/wxPython-4.0.7.post2-cp36-cp36m-linux_x86_64.whl
To find the latest CentOS 7 whl's look to
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/centos-7/
pip install robotframework-ride==1.7.4.1
pip install robotframework-seleniumlibrary
NOTE: If any of the above commands fail with "pip: command not found", then change the command from pip to pip3 and the command should work.
To ensure that all of the above installed correctly, use python3 -m pip list and ensure that bumpy, robotframework-ride, wxPython, robotframework and robot framework-seleniumlibrary are all listed.
python3 -m robotide.__init__
https://robotframework.org
https://robotframework.org/robotframework/latest/libraries/BuiltIn.html
https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html
https://robotframework.org/robotframework/latest/libraries/Collections.html
A: The execution of RIDE fails because wxPython was upgraded to version 4.1.0. This can be solved by installing the last compatible version 4.0.7.post2:
pip install -U --force wxPython==4.0.7.post2
A: A new version of RIDE (1.7.4.2) was released to have this wxPython version locked on 4.0.7.post2. First time users will have the correct version installed. Existing users don't need to upgrade RIDE, because this was the only change.
9. Q: I have no alternative, other than install wxPython 4.1 on Python 3.8, on my Ubuntu 20.04, but the below wxpython test program fails with the error: ImportError: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
. What can I do to solve this?
#!/usr/bin/env python
import wx
print(f"This app is running with wxPython version {wx.VERSION}")
app = wx.App(redirect=False, useBestVisual=True) # Create a new app, don't redirect stdout/stderr to a window.
frame = wx.Frame(None, wx.ID_ANY, "Hello World") # A Frame is a top-level window.
frame.Show(True) # Show the frame.
app.MainLoop()
A: The missing optional system library must be installed, and then the current (2.0b1.dev1) development version of RIDE:
sudo apt-get install libsdl1.2debian
sudo pip install https://github.com/robotframework/RIDE/archive/master.zip
There may be some problems with wxPython 4.1, specially at Grid Editor when typing. You should only use the Text Editor if that is the case.