testability-driver-qt-sut-plugin 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/installer/extconf.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/action.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/application.rb +174 -236
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/attribute.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/behaviour.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/configure_behaviour.rb +7 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/events.rb +7 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/file_transfer.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/find.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/fixture.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/gesture.rb +73 -60
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/infologger.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/key_press.rb +6 -6
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/locale_db.rb +8 -8
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/method.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/multitouch.rb +348 -329
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/os.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/qt_api_method.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/record.rb +7 -7
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/screen_capture.rb +9 -9
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/sut.rb +79 -27
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/synchronization.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/treewidgetitemcolumn.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/type_text.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/view_item.rb +5 -5
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/webkit.rb +13 -11
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/widget.rb +70 -67
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/qt.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/configure_command.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/find_object.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/fixture.rb +2 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/group.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/infologger_command.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/key_sequence.rb +3 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/screen_capture.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/tap.rb +1 -1
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/widget.rb +30 -14
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/plugin.rb +8 -3
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/adapter.rb +160 -29
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/communication.rb +6 -8
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/controller.rb +13 -2
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/find_object_generator.rb +50 -35
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb +129 -95
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/widget.rb +4 -4
- data/xml/behaviour/qt.xml +8 -12
- metadata +53 -72
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/view_item.rb
CHANGED
@@ -64,32 +64,32 @@ module MobyBehaviour
|
|
64
64
|
command.application_id(get_application_id)
|
65
65
|
command.object_type(:Standard)
|
66
66
|
command.command_name('Tap')
|
67
|
-
command.set_event_type(
|
67
|
+
command.set_event_type($parameters[ @sut.id ][ :event_type, "0" ])
|
68
68
|
|
69
69
|
mouse_move = @sut.parameter[:in_tap_move_pointer]
|
70
70
|
mouse_move = 'false' unless mouse_move
|
71
71
|
|
72
72
|
params = {'x'=>center_x, 'y' => center_y, 'count' => 1, 'button' => @@_buttons_map[button], 'mouseMove'=>mouse_move, 'useCoordinates' => 'true'}
|
73
73
|
|
74
|
-
command.set_event_type(
|
74
|
+
command.set_event_type($parameters[ @sut.id ][ :event_type, "0" ])
|
75
75
|
|
76
76
|
command.command_params(params)
|
77
77
|
@sut.execute_command(command)
|
78
78
|
|
79
79
|
rescue Exception => e
|
80
80
|
|
81
|
-
|
81
|
+
$logger.log "behaviour" , "FAIL;Failed select"#{identity};drag;"
|
82
82
|
Kernel::raise e
|
83
83
|
|
84
84
|
end
|
85
85
|
|
86
|
-
|
86
|
+
$logger.log "behaviour" , "PASS;Operation select executed successfully"#{identity};drag;"
|
87
87
|
ret
|
88
88
|
|
89
89
|
end
|
90
90
|
|
91
91
|
# enable hooking for performance measurement & debug logging
|
92
|
-
|
92
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
93
93
|
end
|
94
94
|
|
95
95
|
end
|
@@ -96,12 +96,12 @@ module MobyBehaviour
|
|
96
96
|
|
97
97
|
rescue Exception => e
|
98
98
|
|
99
|
-
|
99
|
+
$logger.log "behaviour" , "FAIL;Failed send javascript with execute_javascript \"#{java_script}\""
|
100
100
|
Kernel::raise e
|
101
101
|
|
102
102
|
end
|
103
103
|
|
104
|
-
|
104
|
+
$logger.log "behaviour" , "PASS;Operation send javascript executed successfully with execute_javascript \"#{java_script}\""
|
105
105
|
|
106
106
|
returnValue
|
107
107
|
|
@@ -198,14 +198,16 @@ module MobyBehaviour
|
|
198
198
|
temp_id = self.id
|
199
199
|
else
|
200
200
|
temp_id = self.attribute('webFrame')
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
201
|
+
|
202
|
+
elemens_xml_data, unused_rule = TDriver::TestObjectAdapter.get_objects( @sut.xml_data, { :id => self.attribute('webFrame')}, true )
|
203
|
+
object_xml_data = elemens_xml_data[0]
|
204
|
+
object_attributes = TDriver::TestObjectAdapter.test_object_attributes(object_xml_data)
|
205
|
+
x_absolute = object_attributes['x_absolute'].to_i
|
206
|
+
y_absolute = object_attributes['y_absolute'].to_i
|
207
|
+
width = object_attributes['width'].to_i
|
208
|
+
height = object_attributes['height'].to_i
|
209
|
+
horizontalScrollBarHeight = object_attributes['horizontalScrollBarHeight'].to_i
|
210
|
+
verticalScrollBarWidth = object_attributes['verticalScrollBarWidth'].to_i
|
209
211
|
|
210
212
|
#calculate borders
|
211
213
|
frame_down_border = y_absolute + height - horizontalScrollBarHeight
|
@@ -260,7 +262,7 @@ module MobyBehaviour
|
|
260
262
|
|
261
263
|
|
262
264
|
# enable hooking for performance measurement & debug logging
|
263
|
-
|
265
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
264
266
|
|
265
267
|
|
266
268
|
end # Webkit
|
@@ -70,10 +70,10 @@ module MobyBehaviour
|
|
70
70
|
# Hide all future params in a hash
|
71
71
|
use_tap_screen = false
|
72
72
|
if move_params.kind_of? Hash
|
73
|
-
use_tap_screen = move_params[:use_tap_screen].nil? ?
|
73
|
+
use_tap_screen = move_params[:use_tap_screen].nil? ? $parameters[ @sut.id][ :use_tap_screen, 'false'] :
|
74
74
|
move_params[:use_tap_screen].to_s
|
75
75
|
else
|
76
|
-
use_tap_screen =
|
76
|
+
use_tap_screen = $parameters[ @sut.id][ :use_tap_screen, 'false']
|
77
77
|
end
|
78
78
|
command = command_params #in qt_behaviour
|
79
79
|
command.command_name('MouseMove')
|
@@ -84,8 +84,8 @@ module MobyBehaviour
|
|
84
84
|
'y' => center_y,
|
85
85
|
'useCoordinates' => 'true',
|
86
86
|
'useTapScreen' => use_tap_screen,
|
87
|
-
'x_off' =>
|
88
|
-
'y_off' =>
|
87
|
+
'x_off' => $parameters[ @sut.id ][:tap_x_offset , '0' ],
|
88
|
+
'y_off' => $parameters[ @sut.id ][:tap_y_offset , '0' ]
|
89
89
|
}
|
90
90
|
else
|
91
91
|
params = {'useTapScreen' => use_tap_screen.to_s}
|
@@ -96,11 +96,11 @@ module MobyBehaviour
|
|
96
96
|
|
97
97
|
rescue Exception => e
|
98
98
|
|
99
|
-
|
99
|
+
$logger.log "behaviour" , "FAIL;Failed to mouse_move"
|
100
100
|
Kernel::raise e
|
101
101
|
end
|
102
102
|
|
103
|
-
|
103
|
+
$logger.log "behaviour" , "PASS;Operation mouse_move executed successfully"
|
104
104
|
|
105
105
|
nil
|
106
106
|
|
@@ -180,12 +180,12 @@ module MobyBehaviour
|
|
180
180
|
end
|
181
181
|
|
182
182
|
tap_count = tap_params[:tap_count].nil? ? 1 : tap_params[:tap_count]
|
183
|
-
use_tap_screen = tap_params[:use_tap_screen].nil? ?
|
183
|
+
use_tap_screen = tap_params[:use_tap_screen].nil? ? $parameters[ @sut.id][ :use_tap_screen, 'false'] :
|
184
184
|
tap_params[:use_tap_screen].to_s
|
185
185
|
else
|
186
186
|
tap_count = tap_params
|
187
187
|
|
188
|
-
use_tap_screen =
|
188
|
+
use_tap_screen = $parameters[@sut.id][ :use_tap_screen, 'false']
|
189
189
|
end
|
190
190
|
|
191
191
|
raise ArgumentError.new( "Invalid button." ) unless @@_valid_buttons.include?(button)
|
@@ -199,10 +199,10 @@ module MobyBehaviour
|
|
199
199
|
params = {
|
200
200
|
'count' => tap_count.to_s,
|
201
201
|
'button' => @@_buttons_map[button],
|
202
|
-
'mouseMove' =>
|
202
|
+
'mouseMove' => $parameters[ @sut.id ][ :in_tap_move_pointer, 'false' ],
|
203
203
|
'useTapScreen' => use_tap_screen,
|
204
|
-
'x_off' =>
|
205
|
-
'y_off' =>
|
204
|
+
'x_off' => $parameters[ @sut.id ][:tap_x_offset , '0' ],
|
205
|
+
'y_off' => $parameters[ @sut.id ][:tap_y_offset , '0' ]
|
206
206
|
}
|
207
207
|
|
208
208
|
|
@@ -225,23 +225,26 @@ module MobyBehaviour
|
|
225
225
|
if(attribute('objectType') == 'Web')
|
226
226
|
#check that type is not QWebFrame and that QWebFrame is found for object
|
227
227
|
if type != "QWebFrame" and self.attributes.key?('webFrame')
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
228
|
+
# puts "tap: " + (Time.now - tapMeasure).to_s + " s - Not q webframe"
|
229
|
+
elemens_xml_data, unused_rule = TDriver::TestObjectAdapter.get_objects( @sut.xml_data, { :id => self.attribute('webFrame')}, true )
|
230
|
+
object_xml_data = elemens_xml_data[0]
|
231
|
+
object_attributes = TDriver::TestObjectAdapter.test_object_attributes(object_xml_data)
|
232
|
+
x_absolute = object_attributes['x_absolute'].to_i
|
233
|
+
y_absolute = object_attributes['y_absolute'].to_i
|
234
|
+
width = object_attributes['width'].to_i
|
235
|
+
height = object_attributes['height'].to_i
|
236
|
+
horizontalScrollBarHeight = object_attributes['horizontalScrollBarHeight'].to_i
|
237
|
+
verticalScrollBarWidth = object_attributes['verticalScrollBarWidth'].to_i
|
238
|
+
|
239
|
+
# puts "tap: " + (Time.now - tapMeasure).to_s + " s - x_a(#{x_absolute}), y_a(#{y_absolute}), w(#{width}), h(#{height})"
|
240
|
+
|
241
|
+
|
242
|
+
if(object_attributes['baseUrl'] != "" and (
|
243
|
+
(center_x.to_i < x_absolute) or
|
244
|
+
(center_x.to_i > x_absolute + width - verticalScrollBarWidth) or
|
245
|
+
(center_y.to_i < y_absolute) or
|
246
|
+
(center_y.to_i > y_absolute + height - horizontalScrollBarHeight)
|
247
|
+
)
|
245
248
|
)
|
246
249
|
#puts "web element scroll"
|
247
250
|
self.scroll(0,0,1) # enable tap centralization
|
@@ -265,12 +268,12 @@ module MobyBehaviour
|
|
265
268
|
|
266
269
|
rescue Exception => e
|
267
270
|
|
268
|
-
|
271
|
+
$logger.log "behaviour" , "FAIL;Failed tap with tap_count \"#{tap_count}\", button \"#{button.to_s}\".;#{identity};tap;"
|
269
272
|
Kernel::raise e
|
270
273
|
|
271
274
|
end
|
272
275
|
|
273
|
-
|
276
|
+
$logger.log "behaviour" , "PASS;Operation tap executed successfully with tap_count \"#{tap_count}\", button \"#{button.to_s}\".;#{identity};tap;"
|
274
277
|
|
275
278
|
# puts "tap: " + (Time.now - tapMeasure).to_s + " s - tapping ending"
|
276
279
|
|
@@ -331,10 +334,10 @@ module MobyBehaviour
|
|
331
334
|
command_name = tap_params[:command].nil? ? 'Tap' : tap_params[:command]
|
332
335
|
behavior_name = tap_params[:behavior_name].nil? ? 'tap_object' : tap_params[:behavior_name]
|
333
336
|
|
334
|
-
use_tap_screen = tap_params[:use_tap_screen].nil? ?
|
337
|
+
use_tap_screen = tap_params[:use_tap_screen].nil? ? $parameters[ @sut.id][ :use_tap_screen, 'false'] :
|
335
338
|
tap_params[:use_tap_screen].to_s
|
336
339
|
else
|
337
|
-
use_tap_screen =
|
340
|
+
use_tap_screen = $parameters[ @sut.id][ :use_tap_screen, 'false']
|
338
341
|
command_name = 'Tap'
|
339
342
|
behavior_name = 'tap_object'
|
340
343
|
end
|
@@ -352,11 +355,11 @@ module MobyBehaviour
|
|
352
355
|
'y' => ( attribute('y_absolute').to_i + y.to_i ).to_s,
|
353
356
|
'count' => tap_count.to_s,
|
354
357
|
'button' => @@_buttons_map[ button ],
|
355
|
-
'mouseMove' =>
|
358
|
+
'mouseMove' => $parameters[ @sut.id ][ :in_tap_move_pointer, 'false' ],
|
356
359
|
'useCoordinates' => 'true',
|
357
360
|
'useTapScreen' => use_tap_screen,
|
358
|
-
'x_off' =>
|
359
|
-
'y_off' =>
|
361
|
+
'x_off' => $parameters[ @sut.id ][:tap_x_offset , '0' ],
|
362
|
+
'y_off' => $parameters[ @sut.id ][:tap_y_offset , '0' ]
|
360
363
|
|
361
364
|
)
|
362
365
|
|
@@ -364,12 +367,12 @@ module MobyBehaviour
|
|
364
367
|
|
365
368
|
rescue Exception => e
|
366
369
|
|
367
|
-
|
370
|
+
$logger.log "behaviour" , "FAIL;Failed #{behavior_name} with x \"#{x}\", y \"#{y}\", button \"#{button.to_s}\".;#{identity};#{behavior_name};"
|
368
371
|
Kernel::raise e
|
369
372
|
|
370
373
|
end
|
371
374
|
|
372
|
-
|
375
|
+
$logger.log "behaviour" , "PASS;Operation #{behavior_name} executed successfully with x \"#{x}\", y \"#{y}\", button \"#{button.to_s}\".;#{identity};#{behavior_name};"
|
373
376
|
|
374
377
|
nil
|
375
378
|
|
@@ -479,8 +482,8 @@ module MobyBehaviour
|
|
479
482
|
#
|
480
483
|
def long_tap( time = 1, button = :Left, tap_params = {} )
|
481
484
|
|
482
|
-
logging_enabled =
|
483
|
-
|
485
|
+
logging_enabled = $logger.enabled
|
486
|
+
$logger.enabled = false
|
484
487
|
|
485
488
|
|
486
489
|
raise ArgumentError.new("First parameter should be time between taps or Hash") unless tap_params.kind_of? Hash or tap_params.kind_of? Fixnum
|
@@ -491,13 +494,13 @@ module MobyBehaviour
|
|
491
494
|
sleep time
|
492
495
|
tap_up(button, false, tap_params)
|
493
496
|
rescue Exception => e
|
494
|
-
|
495
|
-
|
497
|
+
$logger.enabled = logging_enabled
|
498
|
+
$logger.log "behaviour" , "FAIL;Failed long_tap with time \"#{time.to_s}\", button \"#{button.to_s}\".;#{identity};long_tap;"
|
496
499
|
Kernel::raise e
|
497
500
|
|
498
501
|
end
|
499
|
-
|
500
|
-
|
502
|
+
$logger.enabled = logging_enabled
|
503
|
+
$logger.log "behaviour" , "PASS;Operation long_tap executed successfully with time \"#{time.to_s}\", button \"#{button.to_s}\".;#{identity};long_tap;"
|
501
504
|
|
502
505
|
nil
|
503
506
|
|
@@ -549,12 +552,12 @@ module MobyBehaviour
|
|
549
552
|
tap_up_object(x, y, button, tap_params)
|
550
553
|
rescue Exception => e
|
551
554
|
|
552
|
-
|
555
|
+
$logger.log "behaviour" , "FAIL;Failed long_tap_object with time \"#{time.to_s}\", button \"#{button.to_s}\".;#{identity};long_tap_object;"
|
553
556
|
Kernel::raise e
|
554
557
|
|
555
558
|
end
|
556
559
|
|
557
|
-
|
560
|
+
$logger.log "behaviour" , "PASS;Operation long_tap_object executed successfully with time \"#{time.to_s}\", button \"#{button.to_s}\".;#{identity};long_tap_object;"
|
558
561
|
|
559
562
|
nil
|
560
563
|
|
@@ -591,7 +594,7 @@ module MobyBehaviour
|
|
591
594
|
def tap_down( button = :Left, refresh = false, tap_params = {} )
|
592
595
|
|
593
596
|
begin
|
594
|
-
use_tap_screen = tap_params[:use_tap_screen].nil? ?
|
597
|
+
use_tap_screen = tap_params[:use_tap_screen].nil? ? $parameters[ @sut.id][ :use_tap_screen, 'false'] :
|
595
598
|
tap_params[:use_tap_screen].to_s
|
596
599
|
tap_params[:useTapScreen] = use_tap_screen
|
597
600
|
|
@@ -601,10 +604,10 @@ module MobyBehaviour
|
|
601
604
|
|
602
605
|
params = {
|
603
606
|
'button' => @@_buttons_map[button],
|
604
|
-
'mouseMove' =>
|
607
|
+
'mouseMove' => $parameters[ @sut.id ][ :in_tap_move_pointer, 'false' ],
|
605
608
|
'useTapScreen' => use_tap_screen,
|
606
|
-
'x_off' =>
|
607
|
-
'y_off' =>
|
609
|
+
'x_off' => $parameters[ @sut.id ][:tap_x_offset , '0' ],
|
610
|
+
'y_off' => $parameters[ @sut.id ][:tap_y_offset , '0' ]
|
608
611
|
}
|
609
612
|
|
610
613
|
if attribute('objectType') == 'Web' or attribute('objectType') == 'Embedded'
|
@@ -621,12 +624,12 @@ module MobyBehaviour
|
|
621
624
|
|
622
625
|
rescue Exception => e
|
623
626
|
|
624
|
-
|
627
|
+
$logger.log "behaviour" , "FAIL;Failed tap_down with button \"#{button.to_s}\", refresh \"#{refresh.to_s}\".;#{identity};tap_down;"
|
625
628
|
Kernel::raise e
|
626
629
|
|
627
630
|
end
|
628
631
|
|
629
|
-
|
632
|
+
$logger.log "behaviour" , "PASS;Operation tap_down executed successfully with with button \"#{button.to_s}\", refresh \"#{refresh.to_s}\".;#{identity};tap_down;"
|
630
633
|
|
631
634
|
nil
|
632
635
|
|
@@ -664,7 +667,7 @@ module MobyBehaviour
|
|
664
667
|
def tap_up( button = :Left, refresh = true, tap_params = {} )
|
665
668
|
|
666
669
|
begin
|
667
|
-
use_tap_screen = tap_params[:use_tap_screen].nil? ?
|
670
|
+
use_tap_screen = tap_params[:use_tap_screen].nil? ? $parameters[ @sut.id][ :use_tap_screen, 'false'] :
|
668
671
|
tap_params[:use_tap_screen].to_s
|
669
672
|
tap_params[:useTapScreen] = use_tap_screen
|
670
673
|
|
@@ -677,8 +680,8 @@ module MobyBehaviour
|
|
677
680
|
params['x'] = center_x
|
678
681
|
params['y'] = center_y
|
679
682
|
params['useCoordinates'] = 'true'
|
680
|
-
params['x_off'] =
|
681
|
-
params['y_off'] =
|
683
|
+
params['x_off'] = $parameters[ @sut.id ][:tap_x_offset , '0' ]
|
684
|
+
params['y_off'] = $parameters[ @sut.id ][:tap_y_offset , '0' ]
|
682
685
|
|
683
686
|
end
|
684
687
|
params.merge!(tap_params)
|
@@ -691,12 +694,12 @@ module MobyBehaviour
|
|
691
694
|
|
692
695
|
rescue Exception => e
|
693
696
|
|
694
|
-
|
697
|
+
$logger.log "behaviour" , "FAIL;Failed tap_up with button \"#{button.to_s}\", refresh \"#{refresh.to_s}\".;#{identity};tap_up;"
|
695
698
|
Kernel::raise e
|
696
699
|
|
697
700
|
end
|
698
701
|
|
699
|
-
|
702
|
+
$logger.log "behaviour" , "PASS;Operation tap_up executed successfully with with button \"#{button.to_s}\", refresh \"#{refresh.to_s}\".;#{identity};tap_up;"
|
700
703
|
|
701
704
|
nil
|
702
705
|
|
@@ -726,20 +729,20 @@ module MobyBehaviour
|
|
726
729
|
'count' => tap_count.to_s,
|
727
730
|
'button' => @@_buttons_map[button],
|
728
731
|
'mouseMove'=>'true',
|
729
|
-
'x_off' =>
|
730
|
-
'y_off' =>
|
732
|
+
'x_off' => $parameters[ @sut.id ][:tap_x_offset , '0' ],
|
733
|
+
'y_off' => $parameters[ @sut.id ][:tap_y_offset , '0' ]
|
731
734
|
)
|
732
735
|
|
733
736
|
@sut.execute_command(command)
|
734
737
|
|
735
738
|
rescue Exception => e
|
736
739
|
|
737
|
-
|
740
|
+
$logger.log "behaviour" , "FAIL;Failed press with tap_count \"#{tap_count}\", button \"#{button.to_s}\".;#{identity};press;"
|
738
741
|
Kernel::raise e
|
739
742
|
|
740
743
|
end
|
741
744
|
|
742
|
-
|
745
|
+
$logger.log "behaviour" , "PASS;Operation press executed successfully with tap_count \"#{tap_count}\", button \"#{button.to_s}\".;#{identity};press;"
|
743
746
|
|
744
747
|
nil
|
745
748
|
|
@@ -757,11 +760,11 @@ module MobyBehaviour
|
|
757
760
|
begin
|
758
761
|
long_tap(time, button)
|
759
762
|
rescue Exception => e
|
760
|
-
|
763
|
+
$logger.log "behaviour" , "FAIL;Failed long_press with time \"#{time.to_s}\", button \"#{button.to_s}\".;#{identity};long_press;"
|
761
764
|
Kernel::raise e
|
762
765
|
end
|
763
766
|
|
764
|
-
|
767
|
+
$logger.log "behaviour" , "PASS;Operation long_press executed successfully with time \"#{time.to_s}\", button \"#{button.to_s}\".;#{identity};long_press;"
|
765
768
|
|
766
769
|
nil
|
767
770
|
|
@@ -782,12 +785,12 @@ module MobyBehaviour
|
|
782
785
|
|
783
786
|
rescue Exception => e
|
784
787
|
|
785
|
-
|
788
|
+
$logger.log "behaviour" , "FAIL;Failed hold with button \"#{button.to_s}\", refresh \"#{refresh.to_s}\".;#{identity};hold;"
|
786
789
|
Kernel::raise e
|
787
790
|
|
788
791
|
end
|
789
792
|
|
790
|
-
|
793
|
+
$logger.log "behaviour" , "PASS;Operation hold executed successfully with with button \"#{button.to_s}\", refresh \"#{refresh.to_s}\".;#{identity};hold;"
|
791
794
|
|
792
795
|
nil
|
793
796
|
|
@@ -808,12 +811,12 @@ module MobyBehaviour
|
|
808
811
|
|
809
812
|
rescue Exception => e
|
810
813
|
|
811
|
-
|
814
|
+
$logger.log "behaviour" , "FAIL;Failed release with button \"#{button.to_s}\", refresh \"#{refresh.to_s}\".;#{identity};release;"
|
812
815
|
Kernel::raise e
|
813
816
|
|
814
817
|
end
|
815
818
|
|
816
|
-
|
819
|
+
$logger.log "behaviour" , "PASS;Operation release executed successfully with with button \"#{button.to_s}\", refresh \"#{refresh.to_s}\".;#{identity};release;"
|
817
820
|
|
818
821
|
nil
|
819
822
|
|
@@ -838,7 +841,7 @@ module MobyBehaviour
|
|
838
841
|
=end
|
839
842
|
|
840
843
|
# enable hooking for performance measurement & debug logging
|
841
|
-
|
844
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
842
845
|
|
843
846
|
end # Widget
|
844
847
|
|
@@ -43,7 +43,7 @@ module MobyCommand
|
|
43
43
|
# ArgumentError:: When the supplied command_type is invalid.
|
44
44
|
def initialize(command_type = nil, btn_id = nil)
|
45
45
|
|
46
|
-
@@_valid_commands = [nil, :Press, :Hold, :Release,:Gesture, :Scroll, :Apicommand, :Tap, :Move]
|
46
|
+
@@_valid_commands = [nil, :Press, :Hold, :Release,:Gesture, :Scroll, :Apicommand, :Tap, :Move, :ListStartedApps]
|
47
47
|
@@_valid_directions = [nil, :Up, :Down, :Left,:Right]
|
48
48
|
@@_valid_orientations = [nil,:Vertical, :Horizontal]
|
49
49
|
|
@@ -50,7 +50,7 @@ module MobyController
|
|
50
50
|
end
|
51
51
|
|
52
52
|
# enable hooking for performance measurement & debug logging
|
53
|
-
|
53
|
+
TDriver::Hooking.hook_methods( self ) if defined?( TDriver::Hooking )
|
54
54
|
|
55
55
|
end #module ConfigureCommand
|
56
56
|
|