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 +4 -4
- data/lib/watir_drops/page_object.rb +7 -3
- data/lib/watir_drops.rb +1 -2
- data/watir_drops.gemspec +1 -2
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa11fb059bc7dd8bb7cd180a880f1d300a170852
|
4
|
+
data.tar.gz: 6ea51cf3d197e12b0176cd71ccc6689bc574d9a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a286c2b7cf166dafe1ca229794df2fc6efcd3784d84197c15299f76e85fcf539fc8686834c34d2c7da8b4af6cbcd80a48b94058d1ab7565d099c13675090849
|
7
|
+
data.tar.gz: 09158c49250bffcb8be02d17ef77ac1d170e731e134762c158ed7d7c09867863cbc4206cc185dc73cac342da8ac81f67b911a7be42cf805e3aea9e2f2b092715
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
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
|
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.
|
45
|
+
watir_element.click if val
|
42
46
|
end
|
43
47
|
end
|
44
48
|
|
data/lib/watir_drops.rb
CHANGED
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.
|
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.
|
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
|