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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3d14191f23e8336ab424696936b964b43485a95
4
- data.tar.gz: 859a4c45c037a0e32a3920ff9c720915fca9c766
3
+ metadata.gz: ca2c840a2915ee8a73b3e71a429a5831df4be9d4
4
+ data.tar.gz: dcde135b0b82021b115e17acc2da9972fc39b861
5
5
  SHA512:
6
- metadata.gz: f553ef4803f2180ddee37f52c7d03da2e8863e0bb1007e38f8a6ef5a42b314c294d3dde450e84cb6d4d6c69b3d162a7ccff822cfe95d50b057e406692f8bdb2e
7
- data.tar.gz: 4eb5a1135950c93af2d8df86b86c9cf597aa0f87d8d300ac313a159568b984ca6e861acb173bc304e298d3cd814433311933e9d4e1b6b673e9853beefa71db7b
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
- driver.execute_script(script, element)
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
@@ -180,7 +180,7 @@ class Element
180
180
  end
181
181
 
182
182
  def text
183
- element.text
183
+ element.attribute("value")
184
184
  end
185
185
 
186
186
  def text=(text)
@@ -1,3 +1,3 @@
1
1
  module Gridium
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
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.9
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-06 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler