operawatir 0.4.1.pre5-jruby → 0.4.1.pre6-jruby

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.
Files changed (60) hide show
  1. data/AUTHORS +1 -0
  2. data/CHANGES +170 -3
  3. data/README.md +30 -27
  4. data/VERSION +1 -1
  5. data/bin/desktopwatir +19 -16
  6. data/bin/operawatir +4 -4
  7. data/lib/operadriver/client-combined-nodeps.jar +0 -0
  8. data/lib/operadriver/webdriver-opera.jar +0 -0
  9. data/lib/operawatir/browser.rb +1 -2
  10. data/lib/operawatir/collection.rb +1 -1
  11. data/lib/operawatir/compat/collection.rb +13 -0
  12. data/lib/operawatir/compat/element.rb +57 -15
  13. data/lib/operawatir/compat/window.rb +41 -0
  14. data/lib/operawatir/desktop_browser.rb +26 -9
  15. data/lib/operawatir/desktop_container.rb +82 -29
  16. data/lib/operawatir/element.rb +48 -24
  17. data/lib/operawatir/keys.rb +18 -25
  18. data/lib/operawatir/preferences.rb +223 -6
  19. data/lib/operawatir/quickwidgets/quick_button.rb +8 -2
  20. data/lib/operawatir/quickwidgets/quick_checkbox.rb +4 -4
  21. data/lib/operawatir/quickwidgets/quick_editfield.rb +1 -1
  22. data/lib/operawatir/quickwidgets/quick_find.rb +11 -0
  23. data/lib/operawatir/quickwidgets/quick_griditem.rb +11 -0
  24. data/lib/operawatir/quickwidgets/quick_gridlayout.rb +11 -0
  25. data/lib/operawatir/quickwidgets/quick_searchfield.rb +5 -1
  26. data/lib/operawatir/quickwidgets/quick_tab.rb +0 -1
  27. data/lib/operawatir/quickwidgets/quick_treeitem.rb +22 -1
  28. data/lib/operawatir/quickwidgets/quick_widget.rb +61 -22
  29. data/lib/operawatir/quickwidgets/quick_window.rb +26 -0
  30. data/lib/operawatir/quickwidgets.rb +2 -1
  31. data/lib/operawatir/window.rb +36 -25
  32. data/lib/operawatir.rb +1 -1
  33. data/operawatir.gemspec +38 -5
  34. data/spec/operawatir/core/element_spec.rb +5 -0
  35. data/spec/operawatir/core/window_spec.rb +42 -0
  36. data/spec/operawatir/desktop/desktopbrowser_spec.rb +16 -0
  37. data/spec/operawatir/desktop/quickaddressfield_spec.rb +15 -3
  38. data/spec/operawatir/desktop/quickbutton_spec.rb +234 -20
  39. data/spec/operawatir/desktop/quickcheckbox_spec.rb +36 -0
  40. data/spec/operawatir/desktop/quickdialogtab_spec.rb +30 -0
  41. data/spec/operawatir/desktop/quickdropdown_spec.rb +39 -0
  42. data/spec/operawatir/desktop/quickeditfield_spec.rb +51 -0
  43. data/spec/operawatir/desktop/quickfind_spec.rb +30 -0
  44. data/spec/operawatir/desktop/quickgriditem_spec.rb +16 -0
  45. data/spec/operawatir/desktop/quickgridlayout_spec.rb +15 -0
  46. data/spec/operawatir/desktop/quicklabel_spec.rb +28 -0
  47. data/spec/operawatir/desktop/quickradiobutton_spec.rb +24 -0
  48. data/spec/operawatir/desktop/quicksearchfield_spec.rb +26 -0
  49. data/spec/operawatir/desktop/quicktab_spec.rb +86 -0
  50. data/spec/operawatir/desktop/quickthumbnail_spec.rb +37 -0
  51. data/spec/operawatir/desktop/quicktreeitem_spec.rb +135 -0
  52. data/spec/operawatir/desktop/quicktreeview_spec.rb +30 -0
  53. data/spec/operawatir/desktop/quickwidget_spec.rb +52 -11
  54. data/spec/operawatir/desktop/quickwindow_spec.rb +11 -0
  55. data/spec/operawatir/desktop/shared/shared.rb +100 -10
  56. data/spec/operawatir/fixtures/browsers.svg +367 -0
  57. data/spec/operawatir/fixtures/frames.html +13 -0
  58. data/spec/watir2/select_list_spec.rb +84 -71
  59. metadata +37 -4
  60. data/lib/operadriver/selenium-common.jar +0 -0
@@ -205,8 +205,7 @@ private
205
205
  # FIXME: OPERA_ARGS will be moved to OperaDriver soon.
206
206
  s.setOperaBinaryArguments ENV['OPERA_ARGS'].to_s + ' ' + self.settings[:args].to_s # if self.settings[:args]
207
207
  s.setNoQuit true if self.settings[:no_quit]
208
- s.setUseOperaIdle false if !self.settings[:opera_idle]
209
- s.setUseOperaIdle true if ENV['OPERA_IDLE'].truthy?
208
+ s.setUseOperaIdle true if self.settings[:opera_idle] or ENV['OPERA_IDLE'].truthy?
210
209
  }
211
210
  end
212
211
 
@@ -51,7 +51,7 @@ class OperaWatir::Collection
51
51
  # Public interface to elms, used in Selector
52
52
  def raw_elements
53
53
  _elms.tap do |e|
54
- raise(OperaWatir::Exceptions::UnknownObjectException) if e.empty?
54
+ #raise(OperaWatir::Exceptions::UnknownObjectException) if e.empty?
55
55
  end
56
56
  end
57
57
 
@@ -79,6 +79,10 @@ class OperaWatir::Collection
79
79
  define_method(name) {method_missing(name)}
80
80
  end
81
81
 
82
+ =begin
83
+ This only applies to Watir 1. #to_s is in Watir 2 treated the same
84
+ way as Object#to_s (which will give you a Collection instance).
85
+
82
86
  # Fetches the string representation of this collection.
83
87
  #
84
88
  # @return [String] the string representation of this collection
@@ -95,6 +99,15 @@ class OperaWatir::Collection
95
99
  " text: #{el.text}"
96
100
  end.join("\n")
97
101
  end
102
+ =end
103
+
104
+ def select(option_text)
105
+ option(:text => option_text).node.setSelected
106
+ end
107
+
108
+ def selected?(option_text)
109
+ option(:text => option_text).node.isSelected
110
+ end
98
111
 
99
112
  private
100
113
 
@@ -1,18 +1,24 @@
1
1
  class OperaWatir::Element
2
2
  include Deprecated
3
3
 
4
+ #
4
5
  # Gets the attribute called name.
5
6
  #
6
7
  # @param [String, Symbol] name The name of the attribute to get.
7
8
  # @return [String] The value of the attribute.
9
+ #
10
+
8
11
  def attr(name)
9
12
  node.getAttribute(name.to_s) || ''
10
13
  end
11
14
 
15
+ #
12
16
  # Check the existence of the attribute on the element.
13
17
  #
14
18
  # @return [Boolean] True if the attribute exists on the element,
15
19
  # false otherwise.
20
+ #
21
+
16
22
  def attr?(name)
17
23
  !node.getAttribute(name.to_s).nil?
18
24
  end
@@ -25,9 +31,12 @@ class OperaWatir::Element
25
31
  end
26
32
  end
27
33
 
34
+ #
28
35
  # Gets the text content of the element.
29
36
  #
30
37
  # @return [String] The text content.
38
+ #
39
+
31
40
  def text
32
41
  if node.tag_name =~ /input|textarea|select/i
33
42
  node.value.strip
@@ -36,17 +45,18 @@ class OperaWatir::Element
36
45
  end
37
46
  end
38
47
 
39
- alias_method :to_s, :text
40
-
48
+ #
41
49
  # Checks whether the text content of the element contains the given
42
50
  # string In the compatibility layer as the preferred way of doing
43
51
  # this is.
44
52
  #
45
53
  # elm.text.should include('My string')
46
54
  #
47
- # @param [String] String to search for
48
- # @param [Boolean] true if the element's text contains str, false
49
- # otherwise
55
+ # @param [String] String to search for.
56
+ # @param [Boolean] True if the element's text contains str, false
57
+ # otherwise.
58
+ #
59
+
50
60
  def verify_contains(str)
51
61
  text.include?(str)
52
62
  end
@@ -55,11 +65,15 @@ class OperaWatir::Element
55
65
 
56
66
  alias_method :caption, :text
57
67
 
68
+ #
58
69
  # Clicks on the top left of the element, or the given x, y offset.
70
+ # Asserts whether element is enabled first.
59
71
  #
60
72
  # @param [optional, Fixnum] x The offset from the left of the
61
73
  # element
62
74
  # @param [optional, Fixnum] y The offset from the top of the element
75
+ #
76
+
63
77
  def click(x=0, y=0)
64
78
  assert_enabled!
65
79
  node.click(x.to_i, y.to_i)
@@ -67,27 +81,40 @@ class OperaWatir::Element
67
81
 
68
82
  alias_method :click_no_wait, :click_async
69
83
 
84
+ #
70
85
  # Focuses the element
86
+ #
87
+
71
88
  def focus
72
89
  fire_event :focus
73
90
  end
74
91
 
92
+ #
75
93
  # Submits a form, or the form the elment is contained in.
94
+ #
95
+
76
96
  def submit
77
97
  assert_exists
78
98
  node.submit
79
99
  end
80
100
 
101
+ #
81
102
  # Clears a text input or textarea of any text.
103
+ #
104
+
82
105
  def clear
83
106
  assert_enabled!
84
- uncheck!
107
+ click
108
+ node.clear
85
109
  end
86
110
 
111
+ #
87
112
  # If passed a value it will type text into the element, otherwise it
88
113
  # will check a radio button or checkbox.
89
114
  #
90
- # @param [optional, String] value Text to type
115
+ # @param [String] value (Optional.) Text to type.
116
+ #
117
+
91
118
  def set(value=nil)
92
119
  if value
93
120
  self.text = value
@@ -97,31 +124,40 @@ class OperaWatir::Element
97
124
  end
98
125
  end
99
126
 
127
+ #
100
128
  # Gets the href of an `<a>` element, or the url attribute of any
101
129
  # other element.
102
130
  #
103
- # @return [String] an href or the url attribute
131
+ # @return [String] An href or the @url attribute.
132
+ #
133
+
104
134
  def url
105
135
  attr(tag_name == 'A' ? :href : :url)
106
136
  end
107
137
 
138
+ #
108
139
  # Gets the selected `<option>` elements in a `<select>` element.
109
140
  #
110
- # @return [OperaWatir::Collection] a collection of the selected
111
- # `<option>`s
141
+ # @return [Collection] a collection of the selected
142
+ # `<option>`s
143
+ #
144
+
112
145
  def selected_options
113
146
  options(:selected?, true)
114
147
  end
115
148
 
149
+ #
116
150
  # On checkboxes, radio buttons, and option elements returns whether
117
151
  # the element is checked/selected. On a select element, when passed
118
152
  # an value it checks whether the selected option contains the given
119
153
  # text.
120
154
  #
121
- # @param [optional, String] value Text the selected option should
122
- # contain
123
- # @return [Boolean] true if the element is selected/selected option
124
- # contains value, false otherwise
155
+ # @param [String] value (Optional.) Text the selected option should
156
+ # contain.
157
+ # @return [Boolean] True if the element is selected/selected
158
+ # option contains value, false otherwise.
159
+ #
160
+
125
161
  def selected?(value=nil)
126
162
  if option.nil?
127
163
  selected_options.text.include?(value)
@@ -132,10 +168,13 @@ class OperaWatir::Element
132
168
 
133
169
  alias_method :set?, :checked?
134
170
 
171
+ #
135
172
  # For `<select>` elements returns either 'select-one' for
136
173
  # `<select>`s where only a single `<option>` can be selected, or
137
174
  # 'select-multiple' otherwise. For non-`<select>` elements returns
138
175
  # the `type` attribute.
176
+ #
177
+
139
178
  def type
140
179
  if tag_name == 'SELECT'
141
180
  attr(:multiple) == 'multiple' ? 'select-multiple' : 'select-one'
@@ -144,9 +183,12 @@ class OperaWatir::Element
144
183
  end
145
184
  end
146
185
 
186
+ #
147
187
  # Gets the colspan attribute as an integer.
148
188
  #
149
- # @return [Fixnum] the colspan
189
+ # @return [Fixnum] The colspan.
190
+ #
191
+
150
192
  def colspan
151
193
  attr(:colspan).to_i
152
194
  end
@@ -3,33 +3,74 @@ module OperaWatir
3
3
  module Window
4
4
  include Deprecated
5
5
 
6
+ #
6
7
  # Checks whether the body has the given text in it.
7
8
  #
8
9
  # @param [String] str Text to search for.
9
10
  # @return [Boolean] true if the body contains the given text,
10
11
  # false otherwise
12
+ #
13
+
11
14
  def contains_text(str)
12
15
  text.index(str)
13
16
  end
14
17
 
18
+
19
+ #
15
20
  # Find elements that match the given XPath.
16
21
  #
17
22
  # @param [String] value The XPath expression to search for.
18
23
  # @return [OperaWatir::Collection] A collection of matching
19
24
  # elements.
25
+ #
26
+
20
27
  def elements_by_xpath(value)
21
28
  find_by_xpath(value)
22
29
  end
23
30
 
24
31
  alias_method :element_by_xpath, :elements_by_xpath
25
32
 
33
+
34
+ #
26
35
  # Opera specific
36
+ #
37
+
27
38
  def get_hash
28
39
  visual_hash
29
40
  end
30
41
 
31
42
  deprecated :get_hash, 'browser.visual_hash'
32
43
 
44
+
45
+ #
46
+ # TODO This is a relic from the old OperaWatir implementation,
47
+ # tests should be updated.
48
+ #
49
+
50
+ def frame(selector, argument)
51
+ case selector
52
+ when :name
53
+ driver.switch_to.frame(argument)
54
+ when :index
55
+ driver.switch_to.frame(argument.to_i - 1) # index starts from 1 in Watir
56
+ else
57
+ raise OperaWatir::Exceptions::NotImplementedException,
58
+ "We do not support the `#{selector}' selector yet"
59
+ end
60
+ end
61
+
62
+
63
+ def switch_to_default
64
+ driver.switch_to.default_content
65
+ end
66
+
67
+
68
+ def show_frames
69
+ frames = driver.list_frames
70
+ puts "There are #{frames.length.to_s} frames"
71
+ frames.each_with_index { |frame, i| puts "frame index: #{(i.to_i + 1).to_s} name: #{frame.to_s}" }
72
+ end
73
+
33
74
  end
34
75
  end
35
76
  end
@@ -26,7 +26,7 @@ module OperaWatir
26
26
  active_window.url = url
27
27
  sleep(1)
28
28
  end
29
-
29
+
30
30
  ######################################################################
31
31
  # Quits Opera
32
32
  #
@@ -296,8 +296,11 @@ module OperaWatir
296
296
  end.to_a
297
297
  end
298
298
 
299
- #@private
300
- # Retrieve all tabs
299
+ ####################################################
300
+ # Retrieves an array of all tabs (Document Windows)
301
+ #
302
+ # @return [Array] Array of windows
303
+ #
301
304
  def open_pages
302
305
  quick_windows.select { |win| win.name == "Document Window" }
303
306
  end
@@ -413,6 +416,24 @@ module OperaWatir
413
416
  def cache_preferences_path
414
417
  driver.getCachePreferencesPath()
415
418
  end
419
+
420
+ ######################################################################
421
+ # Returns the language string corresponding to the string_id provided
422
+ #
423
+ # @param string_id the string_id to convert to the corresponding
424
+ # language string
425
+ # @param skip_ampersand if false, then leave string as is, else
426
+ # (default) remove any ampersand in string
427
+ #
428
+ #
429
+ # @example
430
+ # browser.string("D_NEW_PREFERENCES_GENERAL")
431
+ #
432
+ # @return [String] the language string corresponding to the string_id
433
+ #
434
+ def string(string_id, skip_ampersand = true)
435
+ string = driver.getString(string_id, skip_ampersand)
436
+ end
416
437
 
417
438
  ######################################################################
418
439
  # Returns true if the test is running on Mac
@@ -543,8 +564,6 @@ module OperaWatir
543
564
  # Set preference pref in prefs section prefs_section to value
544
565
  # specified.
545
566
  #
546
- # TODO: This needs to be moved to a separate preference section.
547
- #
548
567
  # @param [String] prefs_section The prefs section the pref belongs to
549
568
  # @param [String] pref The preference to set
550
569
  # @param [String] value The value to set the preference to
@@ -554,8 +573,6 @@ module OperaWatir
554
573
 
555
574
  # Get value of preference pref in prefs section prefs_section.
556
575
  #
557
- # TODO: This needs to be moved to a separate preference section.
558
- #
559
576
  # @param [String] prefs_section The prefs section the pref belongs to
560
577
  # @param [String] pref The preference to get
561
578
  #
@@ -567,8 +584,6 @@ module OperaWatir
567
584
  # Get default value of preference pref in prefs section
568
585
  # prefs_section.
569
586
  #
570
- # TODO: This needs to be moved to a separate preference section.
571
- #
572
587
  # @param [String] prefs_section The prefs section the pref belongs to
573
588
  # @param [String] pref The preference to get
574
589
  #
@@ -587,12 +602,14 @@ private
587
602
  def self.opera_driver_settings
588
603
  @opera_driver_settings ||= OperaDriverSettings.new.tap {|s|
589
604
  s.setRunOperaLauncherFromOperaDriver true
605
+ s.setAutostart false if self.settings[:manual]
590
606
  s.setOperaLauncherBinary self.settings[:launcher]
591
607
  s.setOperaBinaryLocation self.settings[:path]
592
608
  s.setOperaBinaryArguments self.settings[:args].to_s + ' -autotestmode'
593
609
  s.setNoQuit self.settings[:no_quit]
594
610
  s.setNoRestart self.settings[:no_restart]
595
611
  s.setGuessOperaPath false
612
+ s.setUseOperaIdle false if !self.settings[:opera_idle]
596
613
  }
597
614
  end
598
615
 
@@ -14,7 +14,12 @@ module OperaWatir
14
14
  # @return [Object] button object if found, otherwise nil
15
15
  #
16
16
  def quick_button(how, what)
17
- QuickButton.new(self, how, what, parent_widget, window_id)
17
+ if how == :pos
18
+ if what.is_a? Fixnum
19
+ what = [0, what]
20
+ end
21
+ end
22
+ QuickButton.new(self, how, what, parent_widget, window_id, :button)
18
23
  end
19
24
 
20
25
  ######################################################################
@@ -36,7 +41,7 @@ module OperaWatir
36
41
  what = [0, what]
37
42
  end
38
43
  end
39
- QuickTab.new(self, how, what, parent_widget, window_id)
44
+ QuickTab.new(self, how, what, parent_widget, window_id, :tabbutton)
40
45
  end
41
46
 
42
47
  ######################################################################
@@ -51,7 +56,7 @@ module OperaWatir
51
56
  # @return [Object] checkbox object if found, otherwise nil
52
57
  #
53
58
  def quick_checkbox(how, what)
54
- QuickCheckbox.new(self, how, what, parent_widget, window_id)
59
+ QuickCheckbox.new(self, how, what, parent_widget, window_id, :checkbox)
55
60
  end
56
61
 
57
62
  ######################################################################
@@ -66,7 +71,7 @@ module OperaWatir
66
71
  # @return [Object] dialog tab object if found, otherwise nil
67
72
  #
68
73
  def quick_dialogtab(how, what)
69
- QuickDialogTab.new(self, how, what, parent_widget, window_id)
74
+ QuickDialogTab.new(self, how, what, parent_widget, window_id, :dialogtab)
70
75
  end
71
76
 
72
77
  ######################################################################
@@ -81,10 +86,24 @@ module OperaWatir
81
86
  # @return [Object] drop down object if found, otherwise nil
82
87
  #
83
88
  def quick_dropdown(how, what)
84
- QuickDropdown.new(self, how, what, parent_widget, window_id)
89
+ QuickDropdown.new(self, how, what, parent_widget, window_id, :dropdown)
85
90
  end
86
91
 
87
-
92
+ ######################################################################
93
+ # Method for accessing a quickfind element
94
+ #
95
+ # @example
96
+ # browser.quick_find(:name, "Filetypes_quickfind")
97
+ #
98
+ # @param [String] how Method to find the element. :name, :string_id or :text
99
+ # @param [String] what Search text to find the element with.
100
+ #
101
+ # @return [Object] quickfind object if found, otherwise nil
102
+ #
103
+ def quick_find(how, what)
104
+ QuickFind.new(self, how, what, parent_widget, window_id, :quickfind)
105
+ end
106
+
88
107
  ######################################################################
89
108
  # Method for accessing an edit or multiedit element
90
109
  #
@@ -97,7 +116,7 @@ module OperaWatir
97
116
  # @return [Object] edit field object if found, otherwise nil
98
117
  #
99
118
  def quick_editfield(how, what)
100
- QuickEditField.new(self, how, what, parent_widget, window_id)
119
+ QuickEditField.new(self, how, what, parent_widget, window_id, :editfield)
101
120
  end
102
121
 
103
122
  ######################################################################
@@ -112,7 +131,7 @@ module OperaWatir
112
131
  # @return [Object] label object if found, otherwise nil
113
132
  #
114
133
  def quick_label(how, what)
115
- QuickLabel.new(self, how, what, parent_widget, window_id)
134
+ QuickLabel.new(self, how, what, parent_widget, window_id, :label)
116
135
  end
117
136
 
118
137
  ######################################################################
@@ -127,7 +146,7 @@ module OperaWatir
127
146
  # @return [Object] radio button object if found, otherwise nil
128
147
  #
129
148
  def quick_radiobutton(how, what)
130
- QuickRadioButton.new(self, how, what, parent_widget, window_id)
149
+ QuickRadioButton.new(self, how, what, parent_widget, window_id, :radiobutton)
131
150
  end
132
151
 
133
152
  ######################################################################
@@ -142,7 +161,7 @@ module OperaWatir
142
161
  # @return [Object] treeview object if found, otherwise nil
143
162
  #
144
163
  def quick_treeview(how, what)
145
- QuickTreeView.new(self, how, what, parent_widget, window_id)
164
+ QuickTreeView.new(self, how, what, parent_widget, window_id, :treeview)
146
165
  end
147
166
 
148
167
  ######################################################################
@@ -157,7 +176,7 @@ module OperaWatir
157
176
  # @return [Object] addressfield object if found, otherwise nil
158
177
  #
159
178
  def quick_addressfield(how, what)
160
- QuickAddressField.new(self, how, what, parent_widget, window_id)
179
+ QuickAddressField.new(self, how, what, parent_widget, window_id, :addressfield)
161
180
  end
162
181
 
163
182
  ######################################################################
@@ -172,7 +191,7 @@ module OperaWatir
172
191
  # @return [Object] searchfield object if found, otherwise nil
173
192
  #
174
193
  def quick_searchfield(how, what)
175
- QuickSearchField.new(self, how, what, parent_widget, window_id)
194
+ QuickSearchField.new(self, how, what, parent_widget, window_id, :search)
176
195
  end
177
196
 
178
197
  ######################################################################
@@ -187,7 +206,7 @@ module OperaWatir
187
206
  # @return [Object] toolbar object if found, otherwise nil
188
207
  #
189
208
  def quick_toolbar(how, what)
190
- QuickToolbar.new(self, how, what, parent_widget, window_id)
209
+ QuickToolbar.new(self, how, what, parent_widget, window_id, :toolbar)
191
210
  end
192
211
 
193
212
  ######################################################################
@@ -203,29 +222,63 @@ module OperaWatir
203
222
  # @return [Object] treeitem object if found, otherwise nil
204
223
  #
205
224
  def quick_treeitem(how, what)
206
- QuickTreeItem.new(self, how, what, parent_widget, window_id)
225
+ QuickTreeItem.new(self, how, what, parent_widget, window_id, :treeitem)
207
226
  end
208
-
209
- ######################################################################
210
- # Method for accessing a thumbnail (speeddial, thumbnail when hovering tab groups)
211
- #
212
- # @example
213
- # browser.quick_thumbnail(:name, "Thumbnail 1")
214
- # browser.quick_thumbnail(:name, "Speed Dial 2")
215
- #
216
- # @param [String] how Method to find the element. :name, :string_id or :text
217
- # @param [String] what Search text to find the element with. Text or position
218
- # of treeitem. Position is specified as [row, column]
219
- #
220
- # @return [Object] thumbnail object if found, otherwise nil
221
- #
227
+
228
+ ######################################################################
229
+ # Method for accessing a grid item in a gridlayout
230
+ #
231
+ # @example (The label dialog for mail labels)
232
+ # browser.quick_gridlayout(:name, "RulesGrid").quick_griditem(:name, "GridItem0").quick_editfield(:name, "Match")
233
+ #
234
+ # @param [String] how Method to find the element. :name, :string_id or :text
235
+ # @param [String] what Search text to find the element with. Text or position
236
+ # of treeitem. Position is specified as [row, column]
237
+ #
238
+ # @return [Object] griditem object if found, otherwise nil
239
+ #
240
+ def quick_griditem(how, what)
241
+ QuickGridItem.new(self, how, what, parent_widget, window_id, :griditem)
242
+ end
243
+
244
+ ######################################################################
245
+ # Method for accessing a grid layout
246
+ # (A grid layout would normally be used to specify the path to a child item in one of its cells.
247
+ #
248
+ # @example (The label dialog for mail labels)
249
+ # browser.quick_gridlayout(:name, "RulesGrid").quick_griditem(:name, "GridItem0").quick_editfield(:name, "Match")
250
+ #
251
+ # @param [String] how Method to find the element. :name, :string_id or :text
252
+ # @param [String] what Search text to find the element with. Text or position
253
+ # of treeitem. Position is specified as [row, column]
254
+ #
255
+ # @return [Object] gridlayout object if found, otherwise nil
256
+ #
257
+ def quick_gridlayout(how, what)
258
+ QuickGridLayout.new(self, how, what, parent_widget, window_id, :gridlayout)
259
+ end
260
+
261
+
262
+ ######################################################################
263
+ # Method for accessing a thumbnail (speeddial, thumbnail when hovering tab groups)
264
+ #
265
+ # @example
266
+ # browser.quick_thumbnail(:name, "Thumbnail 1")
267
+ # browser.quick_thumbnail(:name, "Speed Dial 2")
268
+ #
269
+ # @param [String] how Method to find the element. :name, :string_id or :text
270
+ # @param [String] what Search text to find the element with. Text or position
271
+ # of treeitem. Position is specified as [row, column]
272
+ #
273
+ # @return [Object] thumbnail object if found, otherwise nil
274
+ #
222
275
  def quick_thumbnail(how, what)
223
276
  if how == :pos
224
277
  if what.is_a? Fixnum
225
278
  what = [0, what]
226
279
  end
227
280
  end
228
- QuickThumbnail.new(self, how, what, parent_widget, window_id)
281
+ QuickThumbnail.new(self, how, what, parent_widget, window_id, :thumbnail)
229
282
  end
230
283
 
231
284
  ######################################################################