watir_drops 0.3.0 → 0.3.1

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: 299a92e87b3d647d0607b8494ebb96530d288dc6
4
- data.tar.gz: 864b1daef08f0d67bf59cf3f73aaa06e0a85411f
3
+ metadata.gz: aa11fb059bc7dd8bb7cd180a880f1d300a170852
4
+ data.tar.gz: 6ea51cf3d197e12b0176cd71ccc6689bc574d9a2
5
5
  SHA512:
6
- metadata.gz: 14f394a58a009bcd29ddddae1510a6bb054830b9b632ce7634f9df3f802119075cf697cca32e1242b8e8866709512af02084ec229ecac751e9abd79c82f316d0
7
- data.tar.gz: 7ad1570992eca4938bb2a9b6b425952eda61dd3109593347c03a32b178442b3e617bac343a7336494e232c1c0b6a632de03045fd16086b12b677f2b7bc21ee8f
6
+ metadata.gz: 8a286c2b7cf166dafe1ca229794df2fc6efcd3784d84197c15299f76e85fcf539fc8686834c34d2c7da8b4af6cbcd80a48b94058d1ab7565d099c13675090849
7
+ data.tar.gz: 09158c49250bffcb8be02d17ef77ac1d170e731e134762c158ed7d7c09867863cbc4206cc185dc73cac342da8ac81f67b911a7be42cf805e3aea9e2f2b092715
@@ -1,4 +1,4 @@
1
- require "active_support/inflector"
1
+ require 'active_support/inflector'
2
2
 
3
3
  module WatirDrops
4
4
  class PageObject
@@ -21,13 +21,14 @@ module WatirDrops
21
21
 
22
22
  define_method(name.to_s.pluralize) do |*args|
23
23
  selector = self.instance_exec(*args, &block).instance_variable_get('@selector')
24
- element_type = selector.delete :tag_name
24
+ element_type = selector.delete(:tag_name) || 'element'
25
25
  browser.send(element_type.pluralize, selector)
26
26
  end
27
27
 
28
28
 
29
29
  define_method("#{name}=") do |val|
30
30
  watir_element = self.instance_exec &block
31
+ watir_element.wait_until_present
31
32
  case watir_element
32
33
  when Watir::Radio
33
34
  watir_element.set if val
@@ -37,8 +38,11 @@ module WatirDrops
37
38
  watir_element.select val
38
39
  when Watir::Button
39
40
  watir_element.click
41
+ # TODO - Email & Password types are not set to UserEditable in Watir
42
+ when Watir::Input
43
+ watir_element.send_keys val
40
44
  else
41
- watir_element.value = val
45
+ watir_element.click if val
42
46
  end
43
47
  end
44
48
 
data/lib/watir_drops.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'watir_session'
2
- require 'require_all'
3
2
 
4
- require_all 'lib'
3
+ require 'watir_drops/page_object'
5
4
 
6
5
  include WatirDrops
data/watir_drops.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "watir_drops"
5
- spec.version = '0.3.0'
5
+ spec.version = '0.3.1'
6
6
  spec.authors = ["Titus Fortner"]
7
7
  spec.email = ["titusfortner@gmail.com"]
8
8
 
@@ -20,7 +20,6 @@ application information, allowing it to be decoupled from the tests}
20
20
  spec.add_development_dependency "bundler", "~> 1.10"
21
21
  spec.add_development_dependency "rake", "~> 10.0"
22
22
  spec.add_development_dependency "rspec"
23
- spec.add_development_dependency "require_all"
24
23
  spec.add_development_dependency "test-model"
25
24
  spec.add_development_dependency "watir-webdriver"
26
25
  spec.add_development_dependency "watir_session"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir_drops
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Fortner
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: require_all
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: test-model
71
57
  requirement: !ruby/object:Gem::Requirement