Module: MobyBehaviour::QT::ViewItem
- Includes:
- Behaviour
- Defined in:
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/view_item.rb
Overview
description
ViewItem specific behaviours
behaviour
QtViewItem
requires
testability-driver-qt-sut-plugin
input_type
*
sut_type
QT
sut_version
*
objects
ItemData;QTreeWidgetItem;QListWidgetItem;QTableWidgetItem
Instance Method Summary collapse
-
#select ⇒ Object
Selects an item from a list that uses qt view model system (e.g. QTreeView) == returns NilClass description: - example: -.
Methods included from Behaviour
Instance Method Details
#select ⇒ Object
Selects an item from a list that uses qt view model system (e.g. QTreeView)
returns
NilClass
description: -
example: -
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/view_item.rb', line 55 def select ret = nil begin = :Left command = MobyCommand::WidgetCommand.new command.set_object_id(attribute('viewPort')) command.application_id(get_application_id) command.object_type(:Standard) command.command_name('Tap') command.set_event_type(sut_parameters[ :event_type, "0" ]) mouse_move = @sut.parameter[:in_tap_move_pointer] mouse_move = 'false' unless mouse_move params = {'x'=>center_x, 'y' => center_y, 'count' => 1, 'button' => @@_buttons_map[], 'mouseMove'=>mouse_move, 'useCoordinates' => 'true'} command.set_event_type(sut_parameters[ :event_type, "0" ]) command.command_params(params) @sut.execute_command(command) rescue Exception => e $logger.behaviour "FAIL;Failed select"#{identity};drag;" raise e end $logger.behaviour "PASS;Operation select executed successfully"#{identity};drag;" ret end |