gridium 1.1.11 → 1.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/element.rb +14 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21c60d0c86933dc7c134b4a1df4477e7383f7e4b
4
- data.tar.gz: ac75c7b23af931d5922504a683a5d7b549ae6d31
3
+ metadata.gz: acd1b2c1b0d1f4e0f4e5990735247e7cdac1cb20
4
+ data.tar.gz: 9009bf8fc720f0042065e4ffad60e48533c56b8a
5
5
  SHA512:
6
- metadata.gz: e47b40b45770b778ba05e13a0fee50578cedc829172d66fb40f3bb03b3a6a6e719cd7215403bfb512392751960956e0b219dd63ba563140b108d574cd195ad59
7
- data.tar.gz: 0e6d8a037c6fcfd25ec5c88a2b8237fde5be80bbbb05c54478d6f63dfc5a07f10a79f50d34af19e217f0add8d8d7c1b7b591100490da984becd9cf9a1515953f
6
+ metadata.gz: 30fc0a6d19199d5175527b402315665b6fce86c3cd957d139c44b8e3f8a4b249cebf4eea89590b6895f82ecd1963391bd3e0b8a4f0f1a4bdc7d967d1caf2640c
7
+ data.tar.gz: 965bf7126e8e29131c66c402d555f26d5b6cdb8e39d73c55f75140c8cbe5a794971790f6d2cac64d1230403ebc61ecb4abae7f503d4558754f826984fe2e3918
@@ -121,7 +121,11 @@ class Element
121
121
  end
122
122
 
123
123
  def value
124
- element.attribute "value"
124
+ attribute "value"
125
+ end
126
+
127
+ def innerHTML
128
+ attribute "innerHTML"
125
129
  end
126
130
 
127
131
  def click
@@ -409,15 +413,21 @@ class Element
409
413
 
410
414
  def field_empty_afterward?(*args)
411
415
  Log.debug("[GRIDIUM::Element] Checking the field after sending #{args}, to see if it's empty")
412
- check_again = (has_characters? *args and no_symbols? *args)
413
- field_is_empty_but_should_not_be = (check_again and field_empty?)
416
+ check_again = has_characters?(*args) && no_symbols?(*args)
417
+ field_is_empty_but_should_not_be = check_again && field_empty?
414
418
  if field_is_empty_but_should_not_be
415
419
  raise "Browser Error: tried to input #{args} but found an empty string afterward: #{value}"
416
420
  end
417
421
  end
418
422
 
419
423
  def field_empty?
420
- value.empty?
424
+ if !value.nil?
425
+ value.empty?
426
+ elsif !innerHTML.nil?
427
+ innerHTML.empty?
428
+ else
429
+ raise "Element Error: Supported #{__method__} text attributes are nil"
430
+ end
421
431
  end
422
432
 
423
433
  #
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: 1.1.11
4
+ version: 1.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Urban
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-09 00:00:00.000000000 Z
11
+ date: 2017-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler