page-object 0.8.6.1 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -0
- data/cucumber.yml +1 -1
- data/features/element.feature +8 -0
- data/features/html/static_elements.html +3 -0
- data/features/step_definitions/element_steps.rb +4 -0
- data/features/support/page.rb +2 -0
- data/lib/page-object/accessors.rb +1 -1
- data/lib/page-object/elements/element.rb +1 -1
- data/lib/page-object/version.rb +1 -1
- metadata +4 -4
data/ChangeLog
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
=== Version 0.8.7 / 2013-3-31
|
2
|
+
* Enhancements
|
3
|
+
* Added ability to find elements using any valid attribute
|
4
|
+
|
1
5
|
=== Version 0.8.6.1 / 2013-3-4
|
2
6
|
* Enhancements
|
3
7
|
* Added lable locators for checkbox, text area, select list, radio button and file field (Thanks Alex Rodionov)
|
data/cucumber.yml
CHANGED
data/features/element.feature
CHANGED
@@ -296,3 +296,11 @@ Feature: Elements
|
|
296
296
|
When I retrieve a heading element
|
297
297
|
And I scroll the heading element into view
|
298
298
|
Then the heading element should be visible
|
299
|
+
|
300
|
+
@watir_only
|
301
|
+
Scenario: Expanding how we find elements to include non-standard locators
|
302
|
+
When I retrieve a div using data-entity
|
303
|
+
Then I should know it exists
|
304
|
+
And I should know it is visible
|
305
|
+
And I should know the text is "found using data-entity"
|
306
|
+
|
@@ -72,6 +72,9 @@
|
|
72
72
|
<div id="div_id" name="div_name" class="div_class" title="div_title">
|
73
73
|
page-object rocks!
|
74
74
|
</div>
|
75
|
+
<div data-entity="test">
|
76
|
+
found using data-entity
|
77
|
+
</div>
|
75
78
|
|
76
79
|
<span id="span_id" name="span_name" class="span_class" title="span_title">
|
77
80
|
My alert
|
data/features/support/page.rb
CHANGED
@@ -110,6 +110,8 @@ class Page
|
|
110
110
|
div(:div_class_index, :class => "div_class", :index => 0)
|
111
111
|
div(:div_name_index, :name => "div_name", :index => 0)
|
112
112
|
div(:div_css, :css => ".div_class")
|
113
|
+
|
114
|
+
div(:div_data_entity, :data_entity => "test")
|
113
115
|
|
114
116
|
span(:span_id, :id => 'span_id')
|
115
117
|
span(:span_name, :name => 'span_name')
|
@@ -386,7 +386,7 @@ module PageObject
|
|
386
386
|
# * :id => Watir and Selenium
|
387
387
|
# * :index => Watir and Selenium
|
388
388
|
# * :name => Watir and Selenium
|
389
|
-
# * :text => Watir
|
389
|
+
# * :text => Watir only
|
390
390
|
# * :value => Watir and Selenium
|
391
391
|
# * :xpath => Watir and Selenium
|
392
392
|
# * :src => Watir and Selenium (input type=image only)
|
@@ -169,7 +169,7 @@ module PageObject
|
|
169
169
|
how, what = identifier.keys.first, identifier.values.first
|
170
170
|
return how => what if find_by.include? how or how == :tag_name
|
171
171
|
return find_by_mapping[how] => what if find_by_mapping[how]
|
172
|
-
|
172
|
+
identifier
|
173
173
|
end
|
174
174
|
|
175
175
|
def self.watir_finders
|
data/lib/page-object/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: page-object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: watir-webdriver
|
@@ -397,7 +397,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
397
397
|
version: '0'
|
398
398
|
segments:
|
399
399
|
- 0
|
400
|
-
hash:
|
400
|
+
hash: 1736610363844410914
|
401
401
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
402
402
|
none: false
|
403
403
|
requirements:
|
@@ -406,7 +406,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
406
406
|
version: '0'
|
407
407
|
segments:
|
408
408
|
- 0
|
409
|
-
hash:
|
409
|
+
hash: 1736610363844410914
|
410
410
|
requirements: []
|
411
411
|
rubyforge_project: page-object
|
412
412
|
rubygems_version: 1.8.25
|