UbuntuTestCase QML Type
The UbuntuTestCase class expands the default TestCase class. More...
Import Statement: | import Ubuntu.Test . |
Inherits: |
Methods
- centerOf(item)
- findChild(obj, objectName)
- findChildWithProperty(item, property, value)
- findInvisibleChild(obj, objectName)
- flick(item, x, y, dx, dy, pressTimeout, steps, button, modifiers, delay)
- mouseLongPress(item, x, y, button, modifiers, delay)
- mouseMoveSlowly(item, x, y, dx, dy, steps, stepdelay)
- tryCompareFunction(func, expectedResult, timeout)
- typeString(string)
- warningFormat(line, column, message)
Detailed Description
This component is under heavy development.
This class extends the default QML TestCase class which is available in QtTest 1.0.
Method Documentation
Finds a visible child of an item having a given property with a given value.
Find a non-visual child such as QtObject based on objectName.
The function produces a flick event when executed on Flickables. When used on other components it provides the same functionality as mouseDrag()
function. The optional pressTimeout parameter can be used to introduce a small delay between the mouse press and the first mouse move. Setting a negative or zero value will disable the timeout.
The default flick velocity is built up using 5 move points. This can be altered by setting a positive value to steps parameter. The bigger the number the longer the flick will be. When a negative or zero value is given, the default of 5 move points will be used.
Note: The function can be used to select a text in a TextField or TextArea by specifying at least 400 millisecods to pressTimeout.
Simulates a long press on a mouse button with an optional modifier on an item. The position is defined by x and y. If delay is specified, the test will wait the specified amount of milliseconds before the press.
The position given by x and y is transformed from the co-ordinate system of item into window co-ordinates and then delivered. If item is obscured by another item, or a child of item occupies that position, then the event will be delivered to the other item instead.
Move Mouse from x,y to distance of dx, dy divided to steps with a stepdelay (ms).
Keeps executing a given parameter-less function until it returns the given expected result or the timemout is reached (in which case a test failure is generated)
Warning message formatter, uses file name, line and column numbers to build up the message.