saveObjectSnapshot
saveObjectSnapshot(objectNameOrReference, snapshotImageFile.xml)
This function grabs a snapshot of an object and saves it to the specified file in the xml format. The object snapshot is a state of an object, including all of its properties and its children with children's properties.
If a relative path of the snapshot is specified, it is relative to the working directory of the squishrunner process. (The default working directory of squishrunner is the path of the test case that it is currently executing.)
If an absolute path is specified that path is used as is.
What is actually saved in the snapshot can be customized by making changes to another .xml file located in <SQUISHDIR>/etc/edition_snapshot_filter.xml
, where <edition> is the Squish edition you are using, such as java
, qt
, web
, windows
, mac
, ios
, or android
. With this, you can exclude certain classes or properties of classes, and decide if the real name or the symbolic name should be included in the output.
Here's an example of use that is legal in JavaScript, Python, Ruby, and Perl:
saveObjectSnapshot( objectNameOrReference, "objectSnapshot.xml" );
And for Tcl:
saveObjectSnapshot objectNameOrReference "objectSnapshot.xml"
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.