18.1.1. |
How can I change the default timeout used by the | |||
The easiest solution is to create a custom function with the same name,
but with the timeout you want. Here's how to create a version with a
timeout of 5 seconds; it should go at the top of the test (before
Python
originalWaitForObject = waitForObject
def waitForObject(obj, timeout=5000):
return originalWaitForObject(obj, timeout)
Tcl
rename waitForObject originalWaitForObject
proc waitForObject {obj} {
return [originalWaitForObject $obj 5000]
}
We don't currently have solutions for JavaScript or Perl. | ||||
18.1.2. |
Why does text entered with the | |||
The Qt 4.3 series has a bug that mixes up the order of posted events in the internal queue. In some rare cases this breaks text input or mouse click sequences. This problem was scheduled to be solved in Qt 4.4 and possibly also in Qt 4.3.4. A source code patch is available on request. | ||||
18.1.3. | How do I Build Squish and Qt on IRIX with gcc? | |||
To build Squish, Qt must be linked as a shared library. When compiling
Qt with gcc in IRIX, it is built as a static
library by default. To build Qt as a shared library, specify the
The reason, why static is the default build is because Qt doesn't link
as a shared library on IRIX when being built with
gcc. To fix this problem, edit the file
LFLAGS = -Wl,-LD_LAYOUT:lgot_buffer=100 -shared -Wl,-soname,libqt-mt.so.3 -Wl,-rpath,/usr/people/reggie/qt32-gcc/lib After doing this just compile Qt as usual (i.e., by running make). Then compile Squish as documented elsewhere in this manual (Installing from Source Packages (Section 3.1.2)).
| ||||
18.1.4. | How do I Build Squish with Python Support on MinGW? | |||
Some Python binary distributions already contain an import library for Python that can be used with MinGW. In such cases you don't have to do anything. On the other hand, if you don't have the import library you must generate it yourself. For this you need MinGW's pexports and dlltool tools.
In the following example we assume that Python is installed in
cd C:\Python25\libs pexports C:\WINNT\system32\python25.dll > python25.def dlltool --dllname python25.dll --def python25.def --output-lib libpython25.a For more information see the MinGW Wiki on Python extensions (just the Basic Setup section). | ||||
18.1.5. | I have problems building Squish with a single-threaded Qt 3 library on Windows. | |||
As mentioned in Installation for testing with a single-threaded Qt library (Section 3.1.2.6), most parts of
Squish can be built with a single-threaded Qt library. On Windows
there is one problem with this: The single-threaded Qt library is linked
against the static
To work around the problem, open the file
QMAKE_CFLAGS_RELEASE = -O1 QMAKE_CFLAGS_DEBUG = -Z7 to: QMAKE_CFLAGS_RELEASE = -O1 -MD QMAKE_CFLAGS_DEBUG = -Z7 -MDd
After doing this you must regenerate Qt's cd %QTDIR%\src qmake qt.pro nmake clean nmake | ||||
18.1.6. | Why doesn't Squish record mouse move events? | |||
Squish only records mouse move events when a mouse button is pressed—even if Qt's mouse tracking is enabled. This is because in most cases mouse move events that take place when no mouse button is pressed can be ignored since they don't need to be replayed for the widgets to function properly. Furthermore, recording these events would produce a lot of script code which would not affect the application, but would make the script harder to read and maintain.
For those rare cases where it is necessary to record all the mouse move
events because they are essential for the widget to work correctly, you
can change Squish's behavior. For example, let's assume that we have a
custom widget of type setMouseTracking CanvasView true Then we can tell Squish to execute this file at startup: squishrunner --config addInitScript Qt <absolute_path>/myinit.tcl
After this, when recording a test case, mouse move events on
| ||||
18.1.7. |
Why do my widgets always get names like | |||
Squish tries to create the most descriptive names for GUI objects. By
default is uses the
One solution (and probably the best!) to get better names in
generated scripts is to give all the widgets descriptive, short and
unique
If the custom widgets have other possibly unique properties,
like a label, etc., Squish can be told to try using these
properties. For example, suppose that we have a custom widget called
setUniqueProperty CanvasView label Then tell Squish to interpret this file at startup: squishrunner --config addInitScript Qt <absolute_path>/myinit.tcl
After doing this, Squish will attempt to use the
| ||||
18.1.8. | Why does Squish fail to hook into my AUT on AIX? | |||
Usually, Squish hooks into the AUT without requiring any special preparations. However, in some cases—such as on AIX—this is not possible due to technical limitations of the operating system. See the chapter Using the Built-in Hook (Section 16.11.2) in the Reference Manual (Chapter 16) for a solution. | ||||
18.1.8. |
Why does squishrunner fail to start with the error
| |||
Due to the usage of third-party code and imperfect compilers, Squish contains libraries with so called "text relocations". By themselves these are harmless but a "hardened" Linux distribution with SELinux (Security Enhanced Linux) installed may nevertheless disallow such a property.
We are still investigating this problem, but meanwhile one workaround is
to change the SELinux policy from enforcing to permissive—on most
modern systems this can be done via a GUI configuration tool, or it can
be done by manually editing the A more fine-grained solution is also possible using the chcon tool. This allows for the setting of the security context for individuals files. Here is a command that a customer gave us that should make things work: find /path/to/squish -type f -name "*.so" | xargs chcon -t textrel_shlib_t | ||||
18.1.9. | Why doesn't Squish replay paintings properly in my painting application? | |||
When a mouse press event is followed by mouse move events (while the
button is still pressed), Squish compresses all these events into a
single
Using a
To enable recording to work properly for applications that depend on all
of the individual mouse move events being recorded individually, there's
a way to disable the creation of the |