lib/async/webdriver/element.rb in async-webdriver-0.2.0 vs lib/async/webdriver/element.rb in async-webdriver-0.3.0
- old
+ new
@@ -112,17 +112,10 @@
# @returns [Element] The element.
def current_scope
self
end
- include Scope::Alerts
- include Scope::Cookies
- include Scope::Elements
- include Scope::Fields
- include Scope::Printing
- include Scope::ScreenCapture
-
# Execute a script in the context of the element. `this` will be the element.
# @parameter script [String] The script to execute.
# @parameter arguments [Array] The arguments to pass to the script.
def execute(script, *arguments)
@session.execute("return (function(){#{script}}).call(...arguments)", self, *arguments)
@@ -132,9 +125,16 @@
# @parameter script [String] The script to execute.
# @parameter arguments [Array] The arguments to pass to the script.
def execute_async(script, *arguments)
@session.execute_async("return (function(){#{script}}).call(...arguments)", self, *arguments)
end
+
+ include Scope::Alerts
+ include Scope::Cookies
+ include Scope::Elements
+ include Scope::Fields
+ include Scope::Printing
+ include Scope::ScreenCapture
# Get the value of an attribute.
#
# Given an attribute name, e.g. `href`, this method will return the value of the attribute, as if you had executed the following JavaScript:
#