gridium 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/driver.rb +18 -1
- data/lib/element.rb +1 -1
- data/lib/gridium/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca2c840a2915ee8a73b3e71a429a5831df4be9d4
|
4
|
+
data.tar.gz: dcde135b0b82021b115e17acc2da9972fc39b861
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a56945c2a5e4b52af23582b269e4f558bf578bfda1055c4939b6295ae2a126a6393f8932e437cc2c7c5c075c20cf391bc49ea8f19a320b4a4a487c84ea3abd2
|
7
|
+
data.tar.gz: da16047fdec1576ba805bb173f9ec815c6378e10391277b13dfc682bff42fcc2dd64aa941f1fbf59525d8d4dc44eb3d19b07a0c5b4487c5904aff5ee5c827af6
|
data/lib/driver.rb
CHANGED
@@ -146,7 +146,12 @@ class Driver
|
|
146
146
|
# @return The value returned from the script
|
147
147
|
#
|
148
148
|
def self.execute_script(script, element)
|
149
|
-
|
149
|
+
if element.is_a?(Element)
|
150
|
+
ele = driver.find_element(element.by, element.locator)
|
151
|
+
driver.execute_script(script, ele)
|
152
|
+
else
|
153
|
+
driver.execute_script(script, element)
|
154
|
+
end
|
150
155
|
end
|
151
156
|
|
152
157
|
#
|
@@ -222,4 +227,16 @@ class Driver
|
|
222
227
|
Log.debug("Window (#{driver.title}) is now the active window.")
|
223
228
|
end
|
224
229
|
|
230
|
+
def self.switch_to_frame(by, locator)
|
231
|
+
Log.debug("Attempting to switch to Frame at: #{locator}")
|
232
|
+
driver.switch_to.frame(driver.find_element(by, locator))
|
233
|
+
Log.debug("Frame at: #{locator} is now active frame!")
|
234
|
+
end
|
235
|
+
|
236
|
+
def self.switch_to_parent_frame
|
237
|
+
Log.debug("Switching back to main parent frame")
|
238
|
+
driver.switch_to.parent_frame
|
239
|
+
Log.debug("Now back to Parent Frame")
|
240
|
+
end
|
241
|
+
|
225
242
|
end
|
data/lib/element.rb
CHANGED
data/lib/gridium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gridium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Urban
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|