File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,14 @@ def self.symbolize_keys(hash)
146
146
result
147
147
end
148
148
149
+ # This method is intended to work with page objects that share
150
+ # a common module. For example, Page::HomePage, Page::SignIn
151
+ # those could be promoted on with Appium.promote_singleton_appium_methods Page
152
+ #
153
+ # If you are promoting on an individual class then you should use
154
+ # Appium.promote_appium_methods instead. The singleton method is intended
155
+ # only for the shared module use case.
156
+ #
149
157
# if modules is a module instead of an array, then the constants of
150
158
# that module are promoted on.
151
159
# otherwise, the array of modules will be used as the promotion target.
@@ -188,6 +196,18 @@ def self.promote_singleton_appium_methods(modules)
188
196
# ```ruby
189
197
# Appium.promote_appium_methods Object
190
198
# ```
199
+ #
200
+ # It's better to promote on specific classes instead of Object
201
+ #
202
+ # ```ruby
203
+ # # promote on rspec
204
+ # Appium.promote_appium_methods RSpec::Core::ExampleGroup
205
+ # ```
206
+ #
207
+ # ```ruby
208
+ # # promote on minispec
209
+ # Appium.promote_appium_methods Minitest::Spec
210
+ # ```
191
211
def self . promote_appium_methods ( class_array )
192
212
fail 'Driver is nil' if $driver. nil?
193
213
# Wrap single class into an array
You can’t perform that action at this time.
0 commit comments