cutedriver-qt-sut-plugin 2.0.0.20210120165900
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/env.rb +24 -0
- data/installer/extconf.rb +62 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin.rb +23 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/action.rb +157 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/application.rb +312 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/attribute.rb +300 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/behaviour.rb +214 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/configure_behaviour.rb +317 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/cute_cpu.rb +145 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/cute_gpu.rb +147 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/cute_mem.rb +142 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/cute_pwr.rb +146 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/events.rb +192 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/file_transfer.rb +375 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/find.rb +82 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/fixture.rb +214 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/fps.rb +189 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/gesture.rb +1039 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/infologger.rb +767 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/key_press.rb +166 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/locale_db.rb +157 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/method.rb +112 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/multitouch.rb +474 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/os.rb +100 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/qt_api_method.rb +148 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/record.rb +134 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/screen_capture.rb +279 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/settings.rb +302 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/sut.rb +840 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/synchronization.rb +257 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/treewidgetitemcolumn.rb +117 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/type_text.rb +97 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/view_item.rb +97 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/webkit.rb +272 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/widget.rb +877 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/action.rb +30 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/configure_command.rb +38 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/drag.rb +44 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/find_object.rb +67 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/group.rb +44 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/infologger_command.rb +38 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/qt.rb +171 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/tap.rb +54 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/version.rb +34 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/widget.rb +199 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/agent.rb +54 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/application.rb +192 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/configure_command.rb +53 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/find_object.rb +48 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/fixture.rb +65 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/group.rb +57 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/infologger_command.rb +53 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/key_sequence.rb +93 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/screen_capture.rb +53 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/tap.rb +62 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/version.rb +46 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/widget.rb +98 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/plugin.rb +200 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/adapter.rb +466 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/communication.rb +185 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/controller.rb +69 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/find_object_generator.rb +287 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/fixture_parameter.rb +77 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb +370 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/widget.rb +79 -0
- data/lib/testability-driver-qt-sut-plugin.rb +24 -0
- data/xml/behaviour/qt.xml +845 -0
- data/xml/defaults/sut_qt.xml +9 -0
- data/xml/keymap/qt.xml +321 -0
- data/xml/keymap/win.xml +174 -0
- data/xml/template/qt.xml +141 -0
- metadata +127 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
require File.expand_path( File.join( File.dirname( __FILE__ ), 'widget.rb' ) )
|
23
|
+
|
24
|
+
module MobyCommand
|
25
|
+
|
26
|
+
class Action < MobyCommand::WidgetCommand
|
27
|
+
|
28
|
+
end #class
|
29
|
+
|
30
|
+
end #module
|
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/configure_command.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
module MobyCommand
|
23
|
+
|
24
|
+
class ConfigureCommand < MobyCommand::CommandData
|
25
|
+
|
26
|
+
attr_accessor :name, :params, :value, :application_id
|
27
|
+
|
28
|
+
def initialize(name = nil, parameter_hash = {}, value = "")
|
29
|
+
|
30
|
+
@name = name
|
31
|
+
@params = parameter_hash
|
32
|
+
@value = value
|
33
|
+
@application_id = ""
|
34
|
+
end
|
35
|
+
|
36
|
+
end # ConfigureCommand
|
37
|
+
|
38
|
+
end # MobyCommand
|
@@ -0,0 +1,44 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
module MobyCommand
|
23
|
+
|
24
|
+
class Drag < MobyCommand::CommandData
|
25
|
+
|
26
|
+
#attr_writer :xcoordinate, :_ycoordinate
|
27
|
+
|
28
|
+
# Constructor to Tap
|
29
|
+
# == params
|
30
|
+
# text:: (optional) String to be added to text sequence if given.
|
31
|
+
# == returns
|
32
|
+
# Instance of TypeText
|
33
|
+
def initialize( start_x = nil, start_y = nil, end_x = nil, end_y = nil, duration = 1 )
|
34
|
+
# Set status value to nil (not executed)
|
35
|
+
@_start_x = start_x
|
36
|
+
@_start_y = start_y
|
37
|
+
@_end_x = end_x
|
38
|
+
@_end_y = end_y
|
39
|
+
@_duration = duration
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
end #module
|
@@ -0,0 +1,67 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
module MobyCommand
|
21
|
+
|
22
|
+
class FindObjectCommand < MobyCommand::CommandData
|
23
|
+
|
24
|
+
# Constructor
|
25
|
+
# == params
|
26
|
+
# btn_id:: (optional) String, id for the button perform this command on
|
27
|
+
# command_type:: (optional) Symbol, defines the command to perform on the button
|
28
|
+
# == returns
|
29
|
+
# MobyCommand::FindObjectCommand:: New CommandData object
|
30
|
+
# == raises
|
31
|
+
# ArgumentError:: When the supplied command_type is invalid.
|
32
|
+
def initialize( sut, app_details = nil, params = nil, checksum = nil )
|
33
|
+
|
34
|
+
@_params = params
|
35
|
+
|
36
|
+
@_app_details = app_details
|
37
|
+
|
38
|
+
@_sut = sut
|
39
|
+
|
40
|
+
@_checksum = checksum
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
# TODO: document me
|
45
|
+
def application_details
|
46
|
+
|
47
|
+
@_app_details
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
# TODO: document me
|
52
|
+
def search_parameters
|
53
|
+
|
54
|
+
@_params
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
# TODO: document me
|
59
|
+
def checksum
|
60
|
+
|
61
|
+
@_checksum
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
end # FindObjectCommand
|
66
|
+
|
67
|
+
end # MobyCommand
|
@@ -0,0 +1,44 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
module MobyCommand
|
21
|
+
|
22
|
+
class Group < MobyCommand::CommandData
|
23
|
+
|
24
|
+
attr_reader :interval, :application, :block, :multitouch
|
25
|
+
|
26
|
+
# Constructor to Group
|
27
|
+
# == params
|
28
|
+
# interval: interval between commands
|
29
|
+
# application: target application
|
30
|
+
# block: block of commands to group
|
31
|
+
def initialize( interval, application, block )
|
32
|
+
@interval = interval
|
33
|
+
@application = application
|
34
|
+
@block = block
|
35
|
+
@multitouch = false
|
36
|
+
end
|
37
|
+
|
38
|
+
def set_multitouch(multitouch = true)
|
39
|
+
@multitouch = multitouch
|
40
|
+
end
|
41
|
+
|
42
|
+
end # Group
|
43
|
+
|
44
|
+
end # MobyCommand
|
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/infologger_command.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
module MobyCommand
|
23
|
+
|
24
|
+
class InfoLoggerCommand < MobyCommand::CommandData
|
25
|
+
|
26
|
+
attr_accessor :application_id, :name, :action, :params
|
27
|
+
|
28
|
+
def initialize(name, parameter_hash = {})
|
29
|
+
|
30
|
+
@application_id = ""
|
31
|
+
@name = name
|
32
|
+
@params = parameter_hash
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end # InfoLoggerCommand
|
37
|
+
|
38
|
+
end # MobyCommand
|
@@ -0,0 +1,171 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
#require File.expand_path( File.join( File.dirname( __FILE__ ), 'command_data' ) )
|
23
|
+
|
24
|
+
module MobyCommand
|
25
|
+
|
26
|
+
|
27
|
+
class QT_Command < MobyCommand::CommandData
|
28
|
+
|
29
|
+
#Application command types
|
30
|
+
#Touch object = :Press
|
31
|
+
#Hold object = :Hold
|
32
|
+
#Release object = :Relase
|
33
|
+
|
34
|
+
attr_accessor :arguments, :method
|
35
|
+
|
36
|
+
# Constructs a new Touch CommandData object
|
37
|
+
# == params
|
38
|
+
# btn_id:: (optional) String, id for the button perform this command on
|
39
|
+
# command_type:: (optional) Symbol, defines the command to perform on the button
|
40
|
+
# == returns
|
41
|
+
# Touch:: New CommandData object
|
42
|
+
# == raises
|
43
|
+
# ArgumentError:: When the supplied command_type is invalid.
|
44
|
+
def initialize(command_type = nil, btn_id = nil)
|
45
|
+
|
46
|
+
@@_valid_commands = [nil, :Press, :Hold, :Release,:Gesture, :Scroll, :Apicommand, :Tap, :Move, :ListStartedApps]
|
47
|
+
@@_valid_directions = [nil, :Up, :Down, :Left,:Right]
|
48
|
+
@@_valid_orientations = [nil,:Vertical, :Horizontal]
|
49
|
+
|
50
|
+
command(command_type)
|
51
|
+
id(btn_id)
|
52
|
+
|
53
|
+
self
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
# Defines the type of command this Touch CommandData object represents
|
59
|
+
# == params
|
60
|
+
# command_type:: Symbol, defines the command to perform on the application
|
61
|
+
# == returns
|
62
|
+
# Touch:: This CommandData object
|
63
|
+
# == raises
|
64
|
+
# ArgumentError:: When the supplied command_type is invalid.
|
65
|
+
def command(command_type)
|
66
|
+
|
67
|
+
raise ArgumentError.new("Given command type '#{command_type.to_s}' is not valid.") unless @@_valid_commands.include?( command_type )
|
68
|
+
@_command = command_type
|
69
|
+
self
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
# Defines the id this Touch CommandData object is associated with
|
74
|
+
# == params
|
75
|
+
# btn_id:: String, id of button to perform this command on
|
76
|
+
# == returns
|
77
|
+
# Touch:: This CommandData object
|
78
|
+
# == raises
|
79
|
+
# ArgumentError:: When btn_id is not nil, integer or numeric string
|
80
|
+
def id(btn_id)
|
81
|
+
|
82
|
+
raise ArgumentError.new("The given object id must be nil, integer or a String.") unless btn_id == nil || btn_id.kind_of?(Integer) || (btn_id.kind_of?(String))
|
83
|
+
|
84
|
+
@_id = btn_id.to_s
|
85
|
+
self
|
86
|
+
|
87
|
+
end
|
88
|
+
|
89
|
+
def get_delta
|
90
|
+
@_delta
|
91
|
+
end
|
92
|
+
|
93
|
+
def delta(delta)
|
94
|
+
@_delta = delta
|
95
|
+
end
|
96
|
+
|
97
|
+
def get_orientation
|
98
|
+
@_orientation
|
99
|
+
end
|
100
|
+
|
101
|
+
def orientation(orientation)
|
102
|
+
raise ArgumentError.new("Given orientation type '#{orientation.to_s}' is not valid.") unless @@_valid_orientations.include?(orientation)
|
103
|
+
@_orientation = orientation
|
104
|
+
end
|
105
|
+
|
106
|
+
def distance(distance)
|
107
|
+
@_distance = distance
|
108
|
+
end
|
109
|
+
|
110
|
+
def get_distance
|
111
|
+
@_distance
|
112
|
+
end
|
113
|
+
|
114
|
+
def speed(speed)
|
115
|
+
@_speed = speed
|
116
|
+
end
|
117
|
+
|
118
|
+
def get_speed
|
119
|
+
@_speed
|
120
|
+
end
|
121
|
+
|
122
|
+
def direction(direction)
|
123
|
+
raise ArgumentError.new("Given direction type '#{direction.to_s}' is not valid.") unless @@_valid_directions.include?(direction)
|
124
|
+
@_direction = direction
|
125
|
+
end
|
126
|
+
|
127
|
+
def get_direction
|
128
|
+
@_direction
|
129
|
+
end
|
130
|
+
|
131
|
+
def get_command
|
132
|
+
@_command
|
133
|
+
end
|
134
|
+
|
135
|
+
def object_type(type)
|
136
|
+
@_object_type = type
|
137
|
+
end
|
138
|
+
|
139
|
+
def get_object_type
|
140
|
+
return "" unless @_object_type
|
141
|
+
@_object_type
|
142
|
+
end
|
143
|
+
|
144
|
+
def get_id
|
145
|
+
@_id
|
146
|
+
end
|
147
|
+
|
148
|
+
def set_coordinates(x, y)
|
149
|
+
@_x = x
|
150
|
+
@_y = y
|
151
|
+
end
|
152
|
+
|
153
|
+
def get_x
|
154
|
+
@_x
|
155
|
+
end
|
156
|
+
|
157
|
+
def get_y
|
158
|
+
@_y
|
159
|
+
end
|
160
|
+
|
161
|
+
def tab_count(tab_count)
|
162
|
+
@_tab_count = tab_count
|
163
|
+
end
|
164
|
+
|
165
|
+
def get_tab_count
|
166
|
+
@_tab_count
|
167
|
+
end
|
168
|
+
|
169
|
+
end #class
|
170
|
+
|
171
|
+
end #module
|
@@ -0,0 +1,54 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
#require File.expand_path( File.join( File.dirname( __FILE__ ), 'command_data' ) )
|
23
|
+
|
24
|
+
module MobyCommand
|
25
|
+
|
26
|
+
class Tap < MobyCommand::CommandData
|
27
|
+
|
28
|
+
# Constructor to Tap
|
29
|
+
# == params
|
30
|
+
# text:: (optional) String to be added to text sequence if given.
|
31
|
+
# == returns
|
32
|
+
# Instance of TypeText
|
33
|
+
def initialize( xcoordinate = nil, ycoordinate = nil, time_to_hold = 1, times_to_tap = 1, time_between_taps = 1 )
|
34
|
+
# Set status value to nil (not executed)
|
35
|
+
@_xcoordinate = xcoordinate
|
36
|
+
@_ycoordinate = ycoordinate
|
37
|
+
@_time_to_hold = time_to_hold
|
38
|
+
@_times_to_tap = times_to_tap
|
39
|
+
@_time_between_taps = time_between_taps
|
40
|
+
end
|
41
|
+
|
42
|
+
def get_x
|
43
|
+
@_xcoordinate
|
44
|
+
end
|
45
|
+
def get_y
|
46
|
+
@_ycoordinate
|
47
|
+
end
|
48
|
+
def get_hold
|
49
|
+
@_time_to_hold
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
end #module
|