squape.settings
breakOnFailure
breakOnFailure(enabled=True)
Allows using breakOnFailure test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-breakonfailure
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
Whether to enable the debugger to stop on every failed verification |
True
|
Examples:
with breakOnFailure():
# code with verifications
Source code in squape/settings.py
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
|
defaultOcrLanguage
defaultOcrLanguage(language)
Allows using defaultOcrLanguage test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-defaultocrlanguage
Parameters:
Name | Type | Description | Default |
---|---|---|---|
language |
str
|
string text representing the Language to be used for OCR Text search |
required |
Examples:
with defaultOcrLanguage("Polish"):
waitForOcrText("Dom")
waitForOcrText("Miasto")
Source code in squape/settings.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
|
imageNotFoundDebugging
imageNotFoundDebugging(enabled)
Allows using imageNotFoundDebugging test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-imagenotfounddebugging
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
Whether to enable debugging when image is not found. |
required |
Examples:
with imageNotFoundDebugging(False):
waitForImage("image1.png")
waitForImage("image2.png")
Source code in squape/settings.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
|
imageSearchMaxScale
imageSearchMaxScale(max_scale)
Allows using imageSearchMaxScale test setting as context managers. https://doc.qt.io/squish/squish-api.html#number-testsettings-imagesearchmaxscale
Parameters:
Name | Type | Description | Default |
---|---|---|---|
max_scale |
float
|
A float value indicating the maximum scale for image search. |
required |
Examples:
with imageSearchMultiscale(), imageSearchMaxScale(150):
test.imagePresent("image1.png")
test.imagePresent("image2.png")
Source code in squape/settings.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
|
imageSearchMinScale
imageSearchMinScale(min_scale)
Allows using imageSearchMinScale test setting as context managers. https://doc.qt.io/squish/squish-api.html#number-testsettings-imagesearchminscale
Parameters:
Name | Type | Description | Default |
---|---|---|---|
min_scale |
float
|
A float value indicating the minimum scale for image search. |
required |
Examples:
with imageSearchMultiscale(), imageSearchMinScale(75):
test.imagePresent("image1.png")
test.imagePresent("image2.png")
Source code in squape/settings.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
imageSearchMultiscale
imageSearchMultiscale(enabled=True)
Allows using imageSearchMultiscale test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-imagesearchmultiscale
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
Whether multi-scale image search is enabled. Defaulting to True |
True
|
Examples:
with imageSearchMultiscale(), imageSearchMaxScale(150):
test.imagePresent("image1.png")
test.imagePresent("image2.png")
Source code in squape/settings.py
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|
imageSearchThreshold
imageSearchThreshold(threshold)
Allows using imageSearchThreshold test setting as context managers. https://doc.qt.io/squish/squish-api.html#number-testsettings-imagesearchthreshold
Parameters:
Name | Type | Description | Default |
---|---|---|---|
threshold |
float
|
the threshold for image search. |
required |
Examples:
with imageSearchTolerant(), imageSearchThreshold(95):
test.imagePresent("image.png")
Source code in squape/settings.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
imageSearchTolerant
imageSearchTolerant(enabled=True)
Allows using imageSearchTolerant test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-imagesearchtolerant
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
Whether image search with tolerance is enabled. Defaulting to True. |
True
|
Examples:
with imageSearchTolerant(), imageSearchThreshold(95):
test.imagePresent()
Source code in squape/settings.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|
logScreenshotOnFail
logScreenshotOnFail(enabled=True)
Allows using logScreenshotOnFail test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-logscreenshotonfail
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
A boolean value indicating whether to enable logging of screenshots on FAIL test result. Defaulting to True. |
True
|
Examples:
with logScreenshotOnFail():
# code with verifications
Source code in squape/settings.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
logScreenshotOnPass
logScreenshotOnPass(enabled=True)
Allows using logScreenshotOnPass test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-logscreenshotonpass
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
A boolean value indicating whether to enable logging of screenshots on PASS test result. Defaulting to True. |
True
|
Examples:
with logScreenshotOnPass():
# code with verifications
Source code in squape/settings.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
logScreenshotOnWarning
logScreenshotOnWarning(enabled=True)
Allows using logScreenshotOnWarning test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-logscreenshotonwarning
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
A boolean value indicating whether to enable logging of screenshots on warning log entry. Defaulting to True. |
True
|
Examples:
with logScreenshotOnWarning():
# code where warning messages might happen
Source code in squape/settings.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
objectNotFoundDebugging
objectNotFoundDebugging(enabled)
Allows using objectNotFoundDebugging test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-objectnotfounddebugging
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
Whether to enable debugging when object is not found. |
required |
Examples:
with objectNotFoundDebugging(False):
waitForObject(names.obj1)
waitForObject(names.obj2)
Source code in squape/settings.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
|
retryDuration
retryDuration(duration_ms)
Allows using retryDuration test setting as context managers. https://doc.qt.io/squish/squish-api.html#integer-testsettings-retryduration
Parameters:
Name | Type | Description | Default |
---|---|---|---|
duration_ms |
int
|
The duration in milliseconds after which the verification fails |
required |
Examples:
with retryDuration(5000):
test.vp("VP1")
Source code in squape/settings.py
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
|
silentVerifications
silentVerifications(enabled=True)
Allows using silentVerifications test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-silentverifications
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
Whether silent verifications are enabled. Defaulting to True |
True
|
Examples:
with silentVerifications():
# code with test.vp statements
Source code in squape/settings.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
textNotFoundDebugging
textNotFoundDebugging(enabled)
Allows using textNotFoundDebugging test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-textnotfounddebugging
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
Whether to enable debugging when a OCR Text is not found. |
required |
Examples:
with textNotFoundDebugging(False):
waitForOcrText("Frog")
waitForOcrText("Alpaca")
Source code in squape/settings.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
|
throwOnFailure
throwOnFailure(enabled)
Allows using throwOnFailure test setting as context managers. https://doc.qt.io/squish/squish-api.html#bool-testsettings-throwonfailure
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled |
bool
|
Whether to enable to raise a script error on every failed verification |
required |
Examples:
with throwOnFailure():
# code with verifications
Source code in squape/settings.py
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
|
waitForObjectTimeout
waitForObjectTimeout(timeout_ms)
Allows using waitForObjectTimeout test setting as context managers. https://doc.qt.io/squish/squish-api.html#integer-testsettings-waitforobjecttimeout
Parameters:
Name | Type | Description | Default |
---|---|---|---|
timeout_ms |
int
|
A integer value indicating the timeout in ms. |
required |
Examples:
with waitForObjectTimeout(500):
waitForObject(names.obj1)
waitForObject(names.obj2)
Source code in squape/settings.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
|