Module: Lebowski::Runtime::SproutCoreExtensions

Includes:
Lebowski
Included in:
SproutCoreDriver
Defined in:
lib/lebowski/runtime/sprout_core_extensions.rb

Constant Summary collapse

HTTP_HEADERS =
{ 'Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8' }
REMOTE_CONTROL_COMMAND_TIMEOUT =
/^timed out after/i

Instance Method Summary collapse

Instance Method Details

#__sc_test_computing_property_path(key, path) ⇒ Object

Selenium User Extensions Testing/Debugging Calls



543
544
545
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 543

def __sc_test_computing_property_path(key, path)
  __remote_control_command("scTestComputePropertyPath", [key.to_s, path,])
end

#__sc_test_object_array_lookup(key, path, lookup) ⇒ Object



557
558
559
560
561
562
563
564
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 557

def __sc_test_object_array_lookup(key, path, lookup)
  params = ObjectEncoder.encode_hash({
    :key => key.to_s,
    :path => path,
    :lookup => lookup,
  })
  __remote_control_command("scTestObjectArrayLookup", [params,])
end

#__sc_test_sending_encoded_array(key, array) ⇒ Object



552
553
554
555
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 552

def __sc_test_sending_encoded_array(key, array)
  str = ObjectEncoder.encode_array(array)
  __remote_control_command("scTestDecodingEncodedArray", [key.to_s, str,])
end

#__sc_test_sending_encoded_hash(key, hash) ⇒ Object



547
548
549
550
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 547

def __sc_test_sending_encoded_hash(key, hash)
  str = ObjectEncoder.encode_hash(hash)
  __remote_control_command("scTestDecodingEncodedHash", [key.to_s, str,])
end

#get_css_selector_count(selector) ⇒ Object



477
478
479
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 477

def get_css_selector_count(selector)
  return __number_command("getCssSelectorCount", [selector, ])
end

#get_element_child_nodes_count(selector, index) ⇒ Object



533
534
535
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 533

def get_element_child_nodes_count(selector, index)
  return __number_command("getElementChildNodesCount", [selector, index])
end

#get_element_tag_name(selector, index) ⇒ Object



529
530
531
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 529

def get_element_tag_name(selector, index)
  return __string_command("getElementTagName", [selector, index,])
end

#get_sc_collection_view_content_disclosure_state(scpath, index) ⇒ Object



372
373
374
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 372

def get_sc_collection_view_content_disclosure_state(scpath, index)
  return __number_command("getScCollectionViewContentDisclosureState", [scpath, index,])
end

#get_sc_collection_view_content_group_indexes(scpath) ⇒ Object

SC Collection View Selenium Calls



352
353
354
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 352

def get_sc_collection_view_content_group_indexes(scpath)
  return __number_array_command("getScCollectionViewContentGroupIndexes", [scpath,])
end

#get_sc_collection_view_content_is_group(scpath, index) ⇒ Object



368
369
370
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 368

def get_sc_collection_view_content_is_group(scpath, index)
  return __boolean_command("getScCollectionViewContentIsGroup", [scpath, index,])
end

#get_sc_collection_view_content_is_selected(scpath, index) ⇒ Object



364
365
366
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 364

def get_sc_collection_view_content_is_selected(scpath, index)
  return __boolean_command("getScCollectionViewContentIsSelected", [scpath, index,])
end

#get_sc_collection_view_content_now_showing_indexes(scpath) ⇒ Object



360
361
362
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 360

def get_sc_collection_view_content_now_showing_indexes(scpath)
  return __number_array_command("getScCollectionViewContentNowShowingIndexes", [scpath,])
end

#get_sc_collection_view_content_outline_level(scpath, index) ⇒ Object



376
377
378
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 376

def get_sc_collection_view_content_outline_level(scpath, index)
  return __number_command("getScCollectionViewContentOutlineLevel", [scpath, index,])
end

#get_sc_collection_view_content_selected_indexes(scpath) ⇒ Object



356
357
358
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 356

def get_sc_collection_view_content_selected_indexes(scpath)
  return __number_array_command("getScCollectionViewContentSelectedIndexes", [scpath,])
end

#get_sc_core_query(scpath, selector) ⇒ Object



322
323
324
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 322

def get_sc_core_query(scpath, selector)
  return __number_command("getScCoreQuery", [scpath, selector])
end

#get_sc_core_query_element_attribute(handle, elemIndex, attribute) ⇒ Object



338
339
340
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 338

def get_sc_core_query_element_attribute(handle, elemIndex, attribute)
  return __string_command("getScCoreQueryElementAttribute", [handle, "#{elemIndex}:#{attribute}",])
end

#get_sc_core_query_element_classes(handle, elemIndex) ⇒ Object



330
331
332
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 330

def get_sc_core_query_element_classes(handle, elemIndex)
  return __string_command("getScCoreQueryElementClasses", [handle, elemIndex,])
end

#get_sc_core_query_element_html(handle, elemIndex) ⇒ Object



334
335
336
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 334

def get_sc_core_query_element_html(handle, elemIndex)
  return __string_command("getScCoreQueryElementHTML", [handle, elemIndex,])
end

#get_sc_core_query_element_tag(handle, elemIndex) ⇒ Object



346
347
348
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 346

def get_sc_core_query_element_tag(handle, elemIndex)
  return __string_command("getScCoreQueryElementTag", [handle, elemIndex,])
end

#get_sc_core_query_element_text(handle, elemIndex) ⇒ Object



342
343
344
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 342

def get_sc_core_query_element_text(handle, elemIndex)
  return __string_command("getScCoreQueryElementText", [handle, elemIndex,])
end

#get_sc_core_query_size(handle) ⇒ Object



326
327
328
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 326

def get_sc_core_query_size(handle)
  return __number_command("getScCoreQuerySize", [handle,])
end

#get_sc_element_height(type, *params) ⇒ Object



149
150
151
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 149

def get_sc_element_height(type, *params)
  return get_element_height(__locator(type, *params))
end

#get_sc_element_width(type, *params) ⇒ Object



145
146
147
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 145

def get_sc_element_width(type, *params)
  return get_element_width(__locator(type, *params))
end

#get_sc_element_window_position(type, *params) ⇒ Lebowski::Coords

Returns:



139
140
141
142
143
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 139

def get_sc_element_window_position(type, *params)
  value = __number_array_command("getScElementWindowPosition", [__locator(type, *params)])
  return nil if value.nil?
  return Coords.new(value[0], value[1])
end

#get_sc_guid(val) ⇒ Object

SC Object Foundation Selenium Calls



36
37
38
39
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 36

def get_sc_guid(val)
  encoded_params = ObjectEncoder.encode_hash({ :val => val })
  return __string_command("getScGuid", [encoded_params])
end

#get_sc_localized_string(str) ⇒ Object



414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 414

def get_sc_localized_string(str)
  if @localized_string_cache.nil?
    @localized_string_cache = {}
  end

  if @localized_string_cache.has_key?(str)
    return @localized_string_cache[str]
  else
    val = __string_command("getScLocalizedString", [str, ])
    @localized_string_cache[str] = val
    return val
  end
end

#get_sc_object_array_index_lookup(scpath, lookup_params) ⇒ Object



405
406
407
408
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 405

def get_sc_object_array_index_lookup(scpath, lookup_params)
  encoded_params = ObjectEncoder.encode_hash(lookup_params)
  return __number_array_command("getScObjectArrayIndexLookup", [scpath, encoded_params])
end

#get_sc_object_class_name(scpath) ⇒ Object



41
42
43
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 41

def get_sc_object_class_name(scpath)
  return __string_command("getScObjectClassName", [scpath])
end

#get_sc_object_class_names(scpath) ⇒ Object



57
58
59
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 57

def get_sc_object_class_names(scpath)
  return __string_array_command("getScObjectClassNames", [scpath])
end

#get_sc_path_boolean_array_value(scpath) ⇒ Object



83
84
85
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 83

def get_sc_path_boolean_array_value(scpath)
  return __boolean_array_command("getScPropertyValue", [scpath])
end

#get_sc_path_boolean_value(scpath) ⇒ Object



71
72
73
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 71

def get_sc_path_boolean_value(scpath)
  return __boolean_command("getScPropertyValue", [scpath])
end

#get_sc_path_number_array_value(scpath) ⇒ Object



79
80
81
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 79

def get_sc_path_number_array_value(scpath)
  return __number_array_command("getScPropertyValue", [scpath])
end

#get_sc_path_number_value(scpath) ⇒ Object



67
68
69
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 67

def get_sc_path_number_value(scpath)
  return __number_command("getScPropertyValue", [scpath])
end

#get_sc_path_string_array_value(scpath) ⇒ Object



75
76
77
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 75

def get_sc_path_string_array_value(scpath)
  return __string_array_command("getScPropertyValue", [scpath])
end

#get_sc_path_string_value(scpath) ⇒ Object

SC Object Property Selenium Calls



63
64
65
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 63

def get_sc_path_string_value(scpath)
  return __string_command("getScPropertyValue", [scpath])
end

#get_sc_property_array_value(scpath, property) ⇒ Object



106
107
108
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 106

def get_sc_property_array_value(scpath, property)
  return get_sc_property_string_array_value(scpath, property)
end

#get_sc_property_boolean_array_value(scpath, property) ⇒ Object



120
121
122
123
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 120

def get_sc_property_boolean_array_value(scpath, property)
  full_path = "#{scpath}.#{property}"
  return __boolean_array_command("getScPropertyValue", [full_path,])
end

#get_sc_property_boolean_value(scpath, property) ⇒ Object



96
97
98
99
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 96

def get_sc_property_boolean_value(scpath, property)
  full_path = "#{scpath}.#{property}"
  return __boolean_command("getScPropertyValue", [full_path,])
end

#get_sc_property_number_array_value(scpath, property) ⇒ Object



115
116
117
118
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 115

def get_sc_property_number_array_value(scpath, property)
  full_path = "#{scpath}.#{property}"
  return __number_array_command("getScPropertyValue", [full_path,])
end

#get_sc_property_number_value(scpath, property) ⇒ Object



101
102
103
104
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 101

def get_sc_property_number_value(scpath, property)
  full_path = "#{scpath}.#{property}"
  return __number_command("getScPropertyValue", [full_path,])
end

#get_sc_property_string_array_value(scpath, property) ⇒ Object



110
111
112
113
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 110

def get_sc_property_string_array_value(scpath, property)
  full_path = "#{scpath}.#{property}"
  return __string_array_command("getScPropertyValue", [full_path,])
end

#get_sc_property_string_value(scpath, property) ⇒ Object



91
92
93
94
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 91

def get_sc_property_string_value(scpath, property)
  full_path = "#{scpath}.#{property}"
  return __string_command("getScPropertyValue", [full_path,])
end

#get_sc_property_value(scpath, property) ⇒ Object



87
88
89
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 87

def get_sc_property_value(scpath, property)
  return get_sc_property_string_value(scpath, property)
end

#get_sc_scrollable_parent_view_layer_id(path) ⇒ Object



537
538
539
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 537

def get_sc_scrollable_parent_view_layer_id(path)
  return __string_command("getScScrollableParentViewLayerId", [path])
end

#get_sc_selection_set_indexes(scpath) ⇒ Object



410
411
412
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 410

def get_sc_selection_set_indexes(scpath)
  return __number_array_command("getScSelectSetIndexes", [scpath, ])
end

#get_sc_type_of(scpath) ⇒ Object



49
50
51
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 49

def get_sc_type_of(scpath)
  return __string_command("getScTypeOf", [scpath])
end

#get_sc_type_of_array_content(scpath) ⇒ Object



53
54
55
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 53

def get_sc_type_of_array_content(scpath)
  return __string_command("getScTypeOfArrayContent", [scpath])
end

#get_sc_view_child_view_count(scpath) ⇒ Object



153
154
155
156
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 153

def get_sc_view_child_view_count(scpath)
  full_path = "#{scpath}.childViews.length"
  return __number_command("getScPropertyValue", [full_path, ])
end

#get_sc_view_frame(scpath) ⇒ Lebowski::Rect

Returns:



132
133
134
135
136
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 132

def get_sc_view_frame(scpath)
  value = __number_array_command("getScViewFrame", [scpath])
  return nil if value.nil?
  return Rect.new(value[0], value[1], value[2], value[3])
end

#get_sc_view_layer(scpath) ⇒ Object

SC View Object Foundation Selenium Calls



127
128
129
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 127

def get_sc_view_layer(scpath)
  return string_command("getScViewLayer", [scpath, ])
end

#initialize_sc_selenium_extension(timeout) ⇒ Object



22
23
24
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 22

def initialize_sc_selenium_extension(timeout)
  __remote_control_command("initializeScSeleniumExtension", [timeout,])
end

#is_sc_bundle_loaded(bundle) ⇒ Object



401
402
403
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 401

def is_sc_bundle_loaded(bundle) 
  return __boolean_command("isScBundleLoaded", [bundle])
end

#is_sc_object_kind_of_class(scpath, klass) ⇒ Object



45
46
47
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 45

def is_sc_object_kind_of_class(scpath, klass)
  return __boolean_command("isScObjectKindOfClass", [scpath, klass])
end

#is_sc_opened_window?(locator_type, locator_value) ⇒ Boolean

Returns:

  • (Boolean)


455
456
457
458
459
460
461
462
463
464
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 455

def is_sc_opened_window?(locator_type, locator_value)
  hash = {
    :locatorType => locator_type,
    :locatorValue => locator_value
  }
  
  encoded_hash = ObjectEncoder.encode_hash(hash)
  
  return __boolean_command("isScOpenedWindow", [encoded_hash])
end

#key_down?(key) ⇒ Boolean

Returns:

  • (Boolean)


283
284
285
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 283

def key_down?(key)
  return __key_pressed?(key)
end

#key_up?(key) ⇒ Boolean

Returns:

  • (Boolean)


287
288
289
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 287

def key_up?(key)
  return (not __key_pressed?(key))
end

#open_sc_application(app_root_path, timeout = nil) ⇒ Object



26
27
28
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 26

def open_sc_application(app_root_path, timeout=nil) 
  __remote_control_command("openScApplication", [app_root_path, timeout])
end

#range_delete_content(*params) ⇒ Object



497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 497

def range_delete_content(*params)
  hash = nil
  
  if params.length == 0 
    raise ArgumentError.new "no parameters were supplied"
  end
  
  if params[0].kind_of? Hash
    hash = params[0]
  end
    
  encoded_hash = ObjectEncoder.encode_hash(hash)
  
  __remote_control_command("rangeDeleteContent", [encoded_hash])
end

#range_insert_content(*params) ⇒ Object



513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 513

def range_insert_content(*params) 
  hash = nil
  
  if params.length == 0 
    raise ArgumentError.new "no parameters were supplied"
  end
  
  if params[0].kind_of? Hash
    hash = params[0]
  end
    
  encoded_hash = ObjectEncoder.encode_hash(hash)
  
  __remote_control_command("rangeInsertContent", [encoded_hash])
end

#sc_basic_click(type, *params) ⇒ Object



221
222
223
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 221

def sc_basic_click(type, *params)
  __remote_control_command("click", [__locator(type, *params), ])
end

#sc_click(type, *params) ⇒ Object



225
226
227
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 225

def sc_click(type, *params)
  __remote_control_command("scClick", [__locator(type, *params), ])
end

#sc_close_opened_window(locator_type, locator_value) ⇒ Object



466
467
468
469
470
471
472
473
474
475
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 466

def sc_close_opened_window(locator_type, locator_value)
  hash = {
    :locatorType => locator_type,
    :locatorValue => locator_value
  }
  
  encoded_hash = ObjectEncoder.encode_hash(hash)
  
  return __boolean_command("scCloseOpenedWindow", [encoded_hash])
end

#sc_core_query_done(handle) ⇒ Object

SC Core Query Selenium Calls



318
319
320
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 318

def sc_core_query_done(handle)
  __remote_control_command("scCoreQueryDone", [handle,])
end

#sc_disable_all_autoscrollingObject

Disables all autoscrolling when performing a drag and drop operation within a SproutCore Application. Call this when you don’t want autoscrolling to interfere with some user action.



388
389
390
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 388

def sc_disable_all_autoscrolling
  __remote_control_command("scDisableAllAutoscrolling")
end

#sc_double_click_at(type, x, y, *params) ⇒ Object



216
217
218
219
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 216

def sc_double_click_at(type, x, y, *params)
  encoded_params = ObjectEncoder.encode_hash({ :x => x, :y => y })
  __remote_control_command("scDoubleClickAt", [__locator(type, *params), encoded_params])
end

#sc_enable_all_autoscrollingObject

Used to enable all autoscrolling. Call this after you have completed a user action that you did not want autoscrolling to intefere with.



397
398
399
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 397

def sc_enable_all_autoscrolling
  __remote_control_command("scEnableAllAutoscrolling")
end

#sc_enable_mouse_move_eventObject



241
242
243
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 241

def sc_enable_mouse_move_event()
  __remote_control_command("scEnableMouseMoveEvent", [])
end

#sc_focus(type, *params) ⇒ Object



245
246
247
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 245

def sc_focus(type, *params)
  __remote_control_command("focus", [__locator(type, *params), ])
end

#sc_key_down(type, key, *params) ⇒ Object



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 249

def sc_key_down(type, key, *params)
  if key == :meta_key or key == :meta
    meta_key_down
  elsif key == :alt_key or key == :alt
    alt_key_down
  elsif key == :ctrl_key or key == :ctrl
    control_key_down
  elsif key == :shift_key or key == :shift
    shift_key_down
  elsif key.kind_of? Symbol
    __remote_control_command("scFunctionKeyDown", [__locator(type, *params), key.to_s])
  else
    __remote_control_command("scKeyDown", [__locator(type, *params), key])
  end
  __register_key_as_down(key)
end

#sc_key_up(type, key, *params) ⇒ Object



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 266

def sc_key_up(type, key, *params)
  if key == :meta_key or key == :meta
    meta_key_up
  elsif key == :alt_key or key == :alt
    alt_key_up
  elsif key == :ctrl_key or key == :ctrl
    control_key_up
  elsif key == :shift_key or key == :shift
    shift_key_up
  elsif key.kind_of? Symbol
    __remote_control_command("scFunctionKeyUp", [__locator(type, *params), key.to_s])
  else
    __remote_control_command("scKeyUp", [__locator(type, *params), key])
  end
  __register_key_as_up(key)
end

#sc_mouse_down(type, *params) ⇒ Object



175
176
177
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 175

def sc_mouse_down(type, *params)
  __remote_control_command("scMouseDown", [__locator(type, *params)])
end

#sc_mouse_down_at(type, x, y, *params) ⇒ Object



196
197
198
199
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 196

def sc_mouse_down_at(type, x, y, *params)
  encoded_params = ObjectEncoder.encode_hash({ :x => x, :y => y })
  __remote_control_command("scMouseDownAt", [__locator(type, *params), encoded_params])
end

#sc_mouse_move(type, *params) ⇒ Object Also known as: sc_mouse_enter, sc_mouse_exit



168
169
170
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 168

def sc_mouse_move(type, *params)
  __remote_control_command("mouseMove", [__locator(type, *params),])
end

#sc_mouse_move_at(type, x, y, *params) ⇒ Object



191
192
193
194
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 191

def sc_mouse_move_at(type, x, y, *params)
  encoded_params = ObjectEncoder.encode_hash({ :x => x, :y => y })
  __remote_control_command("scMouseMoveAt", [__locator(type, *params), encoded_params])
end

#sc_mouse_up(type, *params) ⇒ Object



179
180
181
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 179

def sc_mouse_up(type, *params)
  __remote_control_command("scMouseUp", [__locator(type, *params)])
end

#sc_mouse_up_at(type, x, y, *params) ⇒ Object



201
202
203
204
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 201

def sc_mouse_up_at(type, x, y, *params)
  encoded_params = ObjectEncoder.encode_hash({ :x => x, :y => y })
  __remote_control_command("scMouseUpAt", [__locator(type, *params), encoded_params])
end

#sc_mouse_wheel_delta_x(type, delta, *params) ⇒ Object



233
234
235
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 233

def sc_mouse_wheel_delta_x(type, delta, *params)
  __remote_control_command("scMouseWheelDeltaX", [__locator(type, *params), delta])
end

#sc_mouse_wheel_delta_y(type, delta, *params) ⇒ Object



237
238
239
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 237

def sc_mouse_wheel_delta_y(type, delta, *params)
  __remote_control_command("scMouseWheelDeltaY", [__locator(type, *params), delta])
end

#sc_right_click(type, *params) ⇒ Object



229
230
231
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 229

def sc_right_click(type, *params)
  __remote_control_command("scRightClick", [__locator(type, *params), ])
end

#sc_right_mouse_down(type, *params) ⇒ Object



183
184
185
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 183

def sc_right_mouse_down(type, *params)
  __remote_control_command("scMouseDownRight", [__locator(type, *params)])
end

#sc_right_mouse_down_at(type, x, y, *params) ⇒ Object



206
207
208
209
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 206

def sc_right_mouse_down_at(type, x, y, *params)
  encoded_params = ObjectEncoder.encode_hash({ :x => x, :y => y })
  __remote_control_command("scMouseDownRightAt", [__locator(type, *params), encoded_params])
end

#sc_right_mouse_up(type, *params) ⇒ Object



187
188
189
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 187

def sc_right_mouse_up(type, *params)
  __remote_control_command("scMouseUpRight", [__locator(type, *params)])
end

#sc_right_mouse_up_at(type, x, y, *params) ⇒ Object



211
212
213
214
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 211

def sc_right_mouse_up_at(type, x, y, *params)
  encoded_params = ObjectEncoder.encode_hash({ :x => x, :y => y })
  __remote_control_command("scMouseUpRightAt", [__locator(type, *params), encoded_params])
end

#sc_select(type, optionLocator, *params) ⇒ Object



164
165
166
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 164

def sc_select(type, optionLocator, *params)
  __remote_control_command("select", [__locator(type, *params), optionLocator, ])
end

#sc_select_main_windowObject



440
441
442
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 440

def sc_select_main_window()
  sc_select_window('top', '')
end

#sc_select_window(locator_type, locator_value) ⇒ Object



444
445
446
447
448
449
450
451
452
453
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 444

def sc_select_window(locator_type, locator_value)
  hash = {
    :locatorType => locator_type,
    :locatorValue => locator_value
  }
  
  encoded_hash = ObjectEncoder.encode_hash(hash)
  
  __remote_control_command("scSelectWindow", [encoded_hash])
end

#sc_type(type, text, *params) ⇒ Object

SC View Object Event Selenium Calls



160
161
162
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 160

def sc_type(type, text, *params)
  __remote_control_command("type", [__locator(type, *params), text, ])
end

#sc_type_key(type, key, *params) ⇒ Object



291
292
293
294
295
296
297
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 291

def sc_type_key(type, key, *params)
  if key.kind_of? Symbol
    __remote_control_command("scTypeFunctionKey", [__locator(type, *params), key.to_s, ])
  else
    __remote_control_command("scTypeKey", [__locator(type, *params), key, ])
  end
end

#sc_view_scroll_to_visible(scpath) ⇒ Object



299
300
301
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 299

def sc_view_scroll_to_visible(scpath)
  __remote_control_command("scViewScrollToVisible", [scpath])
end

#sc_wait_until(root_scpath, join, conditions, timeout = nil) ⇒ Object



303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 303

def sc_wait_until(root_scpath, join, conditions, timeout=nil)
  params = {
    :rootPath => root_scpath,
    :join => join,
    :conditions => conditions,
    :timeout => timeout
  }
  
  encoded_params = ObjectEncoder.encode_hash(params)
  
  __remote_control_command("scWaitUntil", [encoded_params])
end

#sc_window_maximizeObject



436
437
438
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 436

def sc_window_maximize()
  __remote_control_command("scWindowMaximize")
end

#sc_window_move_to(x, y) ⇒ Object



428
429
430
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 428

def sc_window_move_to(x, y)
  __remote_control_command("scWindowMoveTo", [x, y])
end

#sc_window_resize_to(width, height) ⇒ Object



432
433
434
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 432

def sc_window_resize_to(width, height)
  __remote_control_command("scWindowResizeTo", [width, height])
end

#select_range(*params) ⇒ Object



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 481

def select_range(*params)
  hash = nil
  
  if params.length == 0 
    raise ArgumentError.new "no parameters were supplied"
  end
  
  if params[0].kind_of? Hash
    hash = params[0]
  end
    
  encoded_hash = ObjectEncoder.encode_hash(hash)
  
  __remote_control_command("selectRange", [encoded_hash])
end

#set_application_name(name) ⇒ Object

SC Application Setup Selenium Calls



18
19
20
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 18

def set_application_name(name)
  __remote_control_command("setScApplicationName", [name,])
end

#update_sc_application_context(app_name, timeout = nil) ⇒ Object



30
31
32
# File 'lib/lebowski/runtime/sprout_core_extensions.rb', line 30

def update_sc_application_context(app_name, timeout=nil)
  __remote_control_command("updateScApplicationContext", [app_name, timeout])
end