selenium_plus 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +65 -18
- data/features/finders.feature +15 -0
- data/features/step_definitions/finder_steps.rb +12 -0
- data/features/step_definitions/tables_steps.rb +1 -0
- data/features/support/env.rb +2 -13
- data/features/support/hooks.rb +1 -10
- data/lib/selenium_plus.rb +22 -4
- data/lib/selenium_plus/cucumber.rb +20 -0
- data/lib/selenium_plus/driver.rb +30 -8
- data/lib/selenium_plus/finders.rb +21 -0
- data/lib/selenium_plus/page_obj/page.rb +9 -8
- data/lib/selenium_plus/page_obj/section.rb +10 -8
- data/lib/selenium_plus/selenium/element.rb +1 -0
- data/lib/selenium_plus/selenium/table.rb +56 -5
- data/lib/selenium_plus/version.rb +1 -1
- data/selenium_plus.gemspec +2 -2
- data/test_site/html/home.html +2 -0
- data/test_site/pages/home_page.rb +12 -0
- data/test_site/sections/info_section.rb +4 -0
- data/test_site/test_project.rb +2 -2
- data/test_site/test_site.rb +2 -5
- metadata +20 -12
data/README.md
CHANGED
@@ -17,7 +17,7 @@ Using page object model and page factory
|
|
17
17
|
|
18
18
|
```ruby
|
19
19
|
|
20
|
-
# define
|
20
|
+
# define pages
|
21
21
|
class LoginPage < SeleniumPlus::Page
|
22
22
|
element(:username_input, :id, 'username')
|
23
23
|
element(:password_input, :id, 'password')
|
@@ -30,39 +30,86 @@ class LoginPage < SeleniumPlus::Page
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
class HomePage < SeleniumPlus::Page
|
34
|
+
|
35
|
+
section(:info_section, InfoSection, :id, 'info')
|
36
|
+
element(:show_btn, :css, 'input[value=Show]')
|
37
|
+
|
38
|
+
def show_first_table
|
39
|
+
show_btn.click
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# define sections
|
44
|
+
|
45
|
+
class InfoSection < SeleniumPlus::Section
|
46
|
+
element(:h_table, :css, 'table.horizontal_headers')
|
47
|
+
element(:v_table, :css, 'table.vertical_headers')
|
48
|
+
end
|
49
|
+
|
50
|
+
# define site
|
51
|
+
|
52
|
+
require 'selenium_plus'
|
53
|
+
Dir.glob("#{File.dirname(__FILE__)}/sections/*.rb").each{ |file| require file }
|
54
|
+
Dir.glob("#{File.dirname(__FILE__)}/pages/*.rb").each{ |file| require file }
|
35
55
|
|
36
56
|
class TestSite
|
57
|
+
def login_page
|
58
|
+
Test::LoginPage.new
|
59
|
+
end
|
37
60
|
|
38
61
|
def home_page
|
39
62
|
Test::HomePage.new
|
40
63
|
end
|
41
|
-
|
42
64
|
end
|
43
65
|
|
44
|
-
|
45
|
-
|
46
|
-
|
66
|
+
```
|
67
|
+
|
68
|
+
# Using SeleniumPlus with Cucumber
|
69
|
+
|
70
|
+
In env.rb, you need to require 'test_site'
|
47
71
|
|
72
|
+
You can select different browser using cucumber Tag,
|
73
|
+
such as @firefox, @chrome and @ie, by default cucumber will use firefox browser.
|
48
74
|
|
49
|
-
|
75
|
+
```ruby
|
50
76
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
77
|
+
@chrome
|
78
|
+
Scenario: Verify HTML Table with horizontal header
|
79
|
+
When I login to home page
|
80
|
+
And I show first table
|
81
|
+
Then Horizontal table text should be:
|
82
|
+
| ID: | Name: | Company: |
|
83
|
+
| 1 | Smith | VMware |
|
84
|
+
| 2 | James | EMC |
|
85
|
+
|
86
|
+
Steps:
|
87
|
+
|
88
|
+
When /^I login to home page$/ do
|
89
|
+
@site = TestSite.new
|
90
|
+
@site.login_page.goto('login.html')
|
91
|
+
@site.login_page.login
|
92
|
+
end
|
93
|
+
|
94
|
+
Then /^Horizontal table text should be:$/ do |h_table|
|
95
|
+
@site.home_page.info_section.h_table.headers_text.should == h_table.headers
|
96
|
+
@site.home_page.info_section.h_table.rows_text.should == h_table.rows
|
97
|
+
end
|
56
98
|
|
57
99
|
```
|
58
100
|
|
59
101
|
Without using page object model
|
60
102
|
|
61
103
|
```ruby
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
104
|
+
|
105
|
+
SeleniumPlus.register_driver :firefox_driver do
|
106
|
+
SeleniumPlus::Driver.new(:browser => :firefox)
|
107
|
+
end
|
108
|
+
|
109
|
+
driver = SeleniumPlus.using_driver(:firefox_driver)
|
110
|
+
|
111
|
+
driver.visit('http://www.google.com.hk')
|
112
|
+
driver.find(:id, 'lst-ib').type('Selenium')
|
113
|
+
driver.find(:css, 'input[name=btnK]').click
|
67
114
|
|
68
115
|
```
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Feature: Verify finders
|
2
|
+
|
3
|
+
Scenario: Verify find element using element.find
|
4
|
+
When I login to home page
|
5
|
+
And Title inside div#info should be: Information tables
|
6
|
+
|
7
|
+
Scenario: Verify find element using element.find
|
8
|
+
When I login to home page
|
9
|
+
And Title outside div#info should be: Test Home Page
|
10
|
+
|
11
|
+
Scenario: Verify find elements using driver.all
|
12
|
+
When I login to home page
|
13
|
+
And Titles should be:
|
14
|
+
| Test Home Page |
|
15
|
+
| Information tables |
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Then /^Title (inside|outside) div#info should be: (.+)$/ do |where, title|
|
2
|
+
case where
|
3
|
+
when 'inside'
|
4
|
+
@site.home_page.info_section.title.should == title
|
5
|
+
when 'outside'
|
6
|
+
@site.home_page.title.should == title
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
Then /^Titles should be:$/ do |titles_table|
|
11
|
+
@site.home_page.titles.should == titles_table.raw.flatten
|
12
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
When /^I show first table$/ do
|
2
2
|
@site.home_page.show_first_table
|
3
3
|
end
|
4
|
+
|
4
5
|
Then /^Horizontal table text should be:$/ do |h_table|
|
5
6
|
@site.home_page.info_section.h_table.headers_text.should == h_table.headers
|
6
7
|
@site.home_page.info_section.h_table.rows_text.should == h_table.rows
|
data/features/support/env.rb
CHANGED
@@ -1,13 +1,2 @@
|
|
1
|
-
$:.unshift(File.dirname(__FILE__)
|
2
|
-
|
3
|
-
require 'test_site'
|
4
|
-
|
5
|
-
SeleniumPlus.register_driver :firefox_driver do
|
6
|
-
SeleniumPlus::Driver.new(:browser => :firefox)
|
7
|
-
end
|
8
|
-
|
9
|
-
SeleniumPlus.register_driver :chrome_driver do
|
10
|
-
SeleniumPlus::Driver.new(:browser => :chrome)
|
11
|
-
end
|
12
|
-
|
13
|
-
SeleniumPlus.using_driver(:firefox_driver)
|
1
|
+
$:.unshift("#{File.dirname(__FILE__)}/../../test_site")
|
2
|
+
require 'test_site'
|
data/features/support/hooks.rb
CHANGED
@@ -3,18 +3,9 @@ Before do |scenario|
|
|
3
3
|
end
|
4
4
|
|
5
5
|
After do |scenario|
|
6
|
-
|
6
|
+
#
|
7
7
|
end
|
8
8
|
|
9
9
|
AfterStep do
|
10
10
|
# Do things after each step.
|
11
|
-
end
|
12
|
-
|
13
|
-
# Setup driver using tags
|
14
|
-
Before('@chrome') do
|
15
|
-
SeleniumPlus.using_driver(:chrome_driver)
|
16
|
-
end
|
17
|
-
|
18
|
-
Before('@firefox') do
|
19
|
-
SeleniumPlus.using_driver(:firefox_driver)
|
20
11
|
end
|
data/lib/selenium_plus.rb
CHANGED
@@ -3,7 +3,9 @@ require 'logger'
|
|
3
3
|
require 'selenium-webdriver'
|
4
4
|
require 'selenium_plus/version'
|
5
5
|
require 'selenium_plus/exceptions'
|
6
|
+
require 'selenium_plus/finders'
|
6
7
|
require 'selenium_plus/driver'
|
8
|
+
require 'selenium_plus/cucumber'
|
7
9
|
require 'selenium_plus/page_obj/container'
|
8
10
|
require 'selenium_plus/page_obj/page'
|
9
11
|
require 'selenium_plus/page_obj/section'
|
@@ -57,7 +59,7 @@ module SeleniumPlus
|
|
57
59
|
#
|
58
60
|
# @return [Symbol]
|
59
61
|
def default_driver
|
60
|
-
@default_driver || :
|
62
|
+
@default_driver || :firefox
|
61
63
|
end
|
62
64
|
|
63
65
|
# The name of the driver currently in use
|
@@ -67,22 +69,38 @@ module SeleniumPlus
|
|
67
69
|
@current_driver || default_driver
|
68
70
|
end
|
69
71
|
|
72
|
+
# Use the default driver as the current driver
|
73
|
+
#
|
74
|
+
def use_default_driver
|
75
|
+
@current_driver = nil
|
76
|
+
end
|
77
|
+
|
70
78
|
def using_driver(driver)
|
71
79
|
unless drivers.has_key?(driver)
|
72
80
|
other_drivers = drivers.keys.map { |key| key.inspect }
|
73
81
|
raise SeleniumPlus::Exceptions::DriverNotFoundError, "Driver #{driver} was not found. Available types: #{other_drivers.join(', ')}"
|
74
82
|
end
|
75
|
-
@driver
|
83
|
+
if @driver.nil? || @driver.native.browser != driver
|
84
|
+
@driver = drivers[driver].call
|
85
|
+
end
|
76
86
|
end
|
77
87
|
end
|
78
|
-
end
|
79
88
|
|
89
|
+
end
|
80
90
|
|
81
91
|
SeleniumPlus.configure do |config|
|
82
92
|
config.default_wait_time =10
|
83
93
|
config.enable_highlight_element = true
|
84
94
|
end
|
85
95
|
|
86
|
-
SeleniumPlus.register_driver :
|
96
|
+
SeleniumPlus.register_driver :firefox do
|
87
97
|
SeleniumPlus::Driver.new(:browser => :firefox)
|
98
|
+
end
|
99
|
+
|
100
|
+
SeleniumPlus.register_driver :chrome do
|
101
|
+
SeleniumPlus::Driver.new(:browser => :chrome)
|
102
|
+
end
|
103
|
+
|
104
|
+
SeleniumPlus.register_driver :ie do
|
105
|
+
SeleniumPlus::Driver.new(:browser => :ie)
|
88
106
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
if defined?(Cucumber)
|
2
|
+
|
3
|
+
Before do |scenario|
|
4
|
+
SeleniumPlus.use_default_driver
|
5
|
+
end
|
6
|
+
|
7
|
+
After do |scenario|
|
8
|
+
SeleniumPlus.driver.reset!
|
9
|
+
end
|
10
|
+
|
11
|
+
Before do |scenario|
|
12
|
+
scenario.source_tag_names.each do |tag|
|
13
|
+
driver_name = tag.sub(/^@/, '').to_sym
|
14
|
+
if SeleniumPlus.drivers.has_key?(driver_name)
|
15
|
+
SeleniumPlus.current_driver = driver_name
|
16
|
+
end
|
17
|
+
end
|
18
|
+
SeleniumPlus.using_driver(SeleniumPlus.current_driver)
|
19
|
+
end
|
20
|
+
end
|
data/lib/selenium_plus/driver.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module SeleniumPlus
|
2
2
|
|
3
3
|
class Driver
|
4
|
+
include Finders
|
4
5
|
|
5
6
|
DEFAULT_OPTIONS = { :browser => :firefox }
|
6
7
|
|
@@ -12,6 +13,9 @@ module SeleniumPlus
|
|
12
13
|
@options = DEFAULT_OPTIONS.merge(options)
|
13
14
|
end
|
14
15
|
|
16
|
+
# Start Selenium::Webdriver::Driver
|
17
|
+
#
|
18
|
+
# @return [Selenium::Webdriver::Driver]
|
15
19
|
def native
|
16
20
|
unless @native
|
17
21
|
@native = Selenium::WebDriver.for(options[:browser])
|
@@ -31,15 +35,33 @@ module SeleniumPlus
|
|
31
35
|
native.get(url)
|
32
36
|
end
|
33
37
|
|
34
|
-
def find(*args)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
38
|
+
#def find(*args)
|
39
|
+
# if self.class.superclass == SeleniumPlus::Section
|
40
|
+
# @el =root_element.find_element(*args)
|
41
|
+
# else
|
42
|
+
# @el = native.find_element(*args)
|
43
|
+
# end
|
44
|
+
# highlight_element(@el) if SeleniumPlus.enable_highlight_element
|
45
|
+
# @el
|
46
|
+
#end
|
47
|
+
#
|
48
|
+
#def all(*args)
|
49
|
+
# if self.class.superclass == SeleniumPlus::Section
|
50
|
+
# root_element.find_elements(*args)
|
51
|
+
# else
|
52
|
+
# native.find_elements(*args)
|
53
|
+
# end
|
54
|
+
#end
|
39
55
|
|
40
|
-
def
|
41
|
-
|
42
|
-
|
56
|
+
#def find(*args)
|
57
|
+
# el = native.find_element(*args)
|
58
|
+
# highlight_element(el) if SeleniumPlus.enable_highlight_element
|
59
|
+
# el
|
60
|
+
#end
|
61
|
+
#
|
62
|
+
#def all(*args)
|
63
|
+
# native.find_elements(*args)
|
64
|
+
#end
|
43
65
|
|
44
66
|
def active_element
|
45
67
|
native.switch_to.active_element
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module SeleniumPlus
|
2
|
+
module Finders
|
3
|
+
def find(*args)
|
4
|
+
if self.class.superclass == SeleniumPlus::Section
|
5
|
+
@el =root_element.find_element(*args)
|
6
|
+
else
|
7
|
+
@el = SeleniumPlus.driver.native.find_element(*args)
|
8
|
+
end
|
9
|
+
SeleniumPlus.driver.highlight_element(@el) if SeleniumPlus.enable_highlight_element
|
10
|
+
@el
|
11
|
+
end
|
12
|
+
|
13
|
+
def all(*args)
|
14
|
+
if self.class.superclass == SeleniumPlus::Section
|
15
|
+
root_element.find_elements(*args)
|
16
|
+
else
|
17
|
+
SeleniumPlus.driver.native.find_elements(*args)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -1,18 +1,19 @@
|
|
1
1
|
module SeleniumPlus
|
2
2
|
class Page
|
3
|
+
include Finders
|
3
4
|
extend Container
|
4
5
|
|
5
6
|
def goto(url)
|
6
7
|
SeleniumPlus.driver.visit(url)
|
7
8
|
end
|
8
9
|
|
9
|
-
private
|
10
|
-
def find(*args)
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
def all(*args)
|
15
|
-
|
16
|
-
end
|
10
|
+
#private
|
11
|
+
#def find(*args)
|
12
|
+
# SeleniumPlus.driver.find(*args)
|
13
|
+
#end
|
14
|
+
#
|
15
|
+
#def all(*args)
|
16
|
+
# SeleniumPlus.driver.all(*args)
|
17
|
+
#end
|
17
18
|
end
|
18
19
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module SeleniumPlus
|
2
2
|
class Section
|
3
|
+
include Finders
|
3
4
|
extend Container
|
4
5
|
|
5
6
|
attr_reader :root_element
|
@@ -8,13 +9,14 @@ module SeleniumPlus
|
|
8
9
|
@root_element = root_element
|
9
10
|
end
|
10
11
|
|
11
|
-
private
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
#private
|
13
|
+
#
|
14
|
+
#def find(*args)
|
15
|
+
# root_element.find(*args)
|
16
|
+
#end
|
17
|
+
#
|
18
|
+
#def all(*args)
|
19
|
+
# root_element.all(*args)
|
20
|
+
#end
|
19
21
|
end
|
20
22
|
end
|
@@ -1,14 +1,32 @@
|
|
1
1
|
module SeleniumPlus
|
2
2
|
module Elements
|
3
3
|
module Table
|
4
|
-
|
4
|
+
|
5
|
+
# Raw Selenium::WebDriver::Element of the table
|
6
|
+
#
|
7
|
+
# Examples:
|
8
|
+
# A html table:
|
9
|
+
# | id | name |
|
10
|
+
# | 1 | alex |
|
11
|
+
# | 2 | smith |
|
12
|
+
#
|
13
|
+
# gets converted into the following:
|
14
|
+
# #=> [[Element, Element],[Element, Element], [Element, Element]]
|
5
15
|
#
|
6
16
|
# @return [Array[Array<Selenium::WebDriver::Element>]]
|
7
17
|
def raw
|
8
18
|
self.all(:css, 'tr').map{ |row| row.all(:css, 'th,td')}
|
9
19
|
end
|
10
20
|
|
11
|
-
# Raw text of table
|
21
|
+
# Raw text of this table
|
22
|
+
# Examples:
|
23
|
+
# A html table:
|
24
|
+
# | id | name |
|
25
|
+
# | 1 | alex |
|
26
|
+
# | 2 | smith |
|
27
|
+
#
|
28
|
+
# gets converted into the following:
|
29
|
+
# #=> [['id', 'name'],['1', 'alex'], ['2', 'smith']]
|
12
30
|
#
|
13
31
|
# @return [Array[Array<String>]]
|
14
32
|
def raw_text
|
@@ -45,21 +63,54 @@ module SeleniumPlus
|
|
45
63
|
end
|
46
64
|
end
|
47
65
|
|
48
|
-
#
|
66
|
+
# Table headers text
|
67
|
+
# Examples:
|
68
|
+
# A html table header with horizontal headers
|
69
|
+
# | id | name |
|
70
|
+
#
|
71
|
+
# and
|
72
|
+
#
|
73
|
+
# A html table header with vertical headers
|
74
|
+
# | id |
|
75
|
+
# | name |
|
76
|
+
#
|
77
|
+
# get converted into the following:
|
78
|
+
# #=> ['id', 'name']
|
49
79
|
#
|
50
80
|
# @return [Array<String>]
|
51
81
|
def headers_text
|
52
82
|
headers.map { |cell| cell.text.strip }
|
53
83
|
end
|
54
84
|
|
55
|
-
#
|
85
|
+
# Table body rows text
|
86
|
+
# Examples:
|
87
|
+
# A html table body with horizontal headers
|
88
|
+
# | 1 | alex |
|
89
|
+
# | 2 | smith |
|
90
|
+
#
|
91
|
+
# and
|
92
|
+
#
|
93
|
+
# A html table body with vertical headers
|
94
|
+
# | 1 | 2 |
|
95
|
+
# | alex | smith |
|
96
|
+
#
|
97
|
+
# get converted into the following:
|
98
|
+
# #=> [['1', 'alex'], ['2', 'smith']]
|
56
99
|
#
|
57
100
|
# @return [Array[Array<String>]]
|
58
101
|
def rows_text
|
59
102
|
rows.map { |row| row.map { |cell| cell.text.strip } }
|
60
103
|
end
|
61
104
|
|
62
|
-
# Array of Hash where the keys of each Hash are the headers in the table
|
105
|
+
# Converts this table into an Array of Hash where the keys of each Hash are the headers in the table.
|
106
|
+
# Examples:
|
107
|
+
# A html table:
|
108
|
+
# | id | name | age |
|
109
|
+
# | 1 | alex | 10 |
|
110
|
+
# | 2 | smith | 16 |
|
111
|
+
#
|
112
|
+
# Gets converted into the following:
|
113
|
+
# # => [{'id' => '1', 'name' => 'alex', 'age' => '10'}, {'id' => '2', 'name' => 'smith', 'age' => '16'}]
|
63
114
|
#
|
64
115
|
# @return [Array<Hash>]
|
65
116
|
def hashes
|
data/selenium_plus.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = SeleniumPlus::VERSION
|
9
9
|
gem.authors = ['SparkYao']
|
10
10
|
gem.email = %w(shipuyao@gmail.com)
|
11
|
-
gem.description = ''
|
11
|
+
gem.description = 'SeleniumPlus creates a very thin layer between Selenium and your applications, it gives your a simple and quick way to describe your web site using the Page Object Model.'
|
12
12
|
gem.summary = ''
|
13
|
-
gem.homepage = ''
|
13
|
+
gem.homepage = 'https://github.com/shipuyao/selenium_plus'
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/test_site/html/home.html
CHANGED
@@ -9,8 +9,10 @@
|
|
9
9
|
</script>
|
10
10
|
</head>
|
11
11
|
<body>
|
12
|
+
<div class='title'>Test Home Page</div>
|
12
13
|
<input type='submit' name='Show First Table' value='Show' onclick="showFirstTable('first')"/>
|
13
14
|
<div id='info'>
|
15
|
+
<div class='title'>Information tables</div>
|
14
16
|
<table id="first" class='horizontal_headers' style="display: none">
|
15
17
|
<tr>
|
16
18
|
<th>ID:</th>
|
@@ -2,11 +2,23 @@ module Test
|
|
2
2
|
class HomePage < SeleniumPlus::Page
|
3
3
|
|
4
4
|
section(:info_section, InfoSection, :id, 'info')
|
5
|
+
|
5
6
|
element(:show_btn, :css, 'input[value=Show]')
|
6
7
|
|
8
|
+
element(:title_div, :css, 'div.title')
|
9
|
+
elements(:title_divs, :css, 'div.title')
|
10
|
+
|
7
11
|
def show_first_table
|
8
12
|
show_btn.click
|
9
13
|
end
|
14
|
+
|
15
|
+
def title
|
16
|
+
title_div.text
|
17
|
+
end
|
18
|
+
|
19
|
+
def titles
|
20
|
+
title_divs.map{ |cell| cell.text.strip }
|
21
|
+
end
|
10
22
|
end
|
11
23
|
end
|
12
24
|
|
data/test_site/test_project.rb
CHANGED
data/test_site/test_site.rb
CHANGED
@@ -1,10 +1,7 @@
|
|
1
|
-
$:.unshift(File.dirname(__FILE__))
|
2
|
-
|
3
1
|
require 'selenium_plus'
|
4
|
-
require 'sections/info_section'
|
5
|
-
require 'pages/login_page'
|
6
|
-
require 'pages/home_page'
|
7
2
|
|
3
|
+
Dir.glob("#{File.dirname(__FILE__)}/sections/*.rb").each{ |file| require file }
|
4
|
+
Dir.glob("#{File.dirname(__FILE__)}/pages/*.rb").each{ |file| require file }
|
8
5
|
|
9
6
|
class TestSite
|
10
7
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70240881264280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70240881264280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: selenium-webdriver
|
27
|
-
requirement: &
|
27
|
+
requirement: &70240881262740 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.25.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70240881262740
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70240881261720 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.1.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70240881261720
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: cucumber
|
49
|
-
requirement: &
|
49
|
+
requirement: &70240881260520 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,8 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.2.1
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
58
|
-
description:
|
57
|
+
version_requirements: *70240881260520
|
58
|
+
description: SeleniumPlus creates a very thin layer between Selenium and your applications,
|
59
|
+
it gives your a simple and quick way to describe your web site using the Page Object
|
60
|
+
Model.
|
59
61
|
email:
|
60
62
|
- shipuyao@gmail.com
|
61
63
|
executables: []
|
@@ -68,14 +70,18 @@ files:
|
|
68
70
|
- README.md
|
69
71
|
- Rakefile
|
70
72
|
- features/drivers.feature
|
73
|
+
- features/finders.feature
|
74
|
+
- features/step_definitions/finder_steps.rb
|
71
75
|
- features/step_definitions/general_steps.rb
|
72
76
|
- features/step_definitions/tables_steps.rb
|
73
77
|
- features/support/env.rb
|
74
78
|
- features/support/hooks.rb
|
75
79
|
- features/tables.feature
|
76
80
|
- lib/selenium_plus.rb
|
81
|
+
- lib/selenium_plus/cucumber.rb
|
77
82
|
- lib/selenium_plus/driver.rb
|
78
83
|
- lib/selenium_plus/exceptions.rb
|
84
|
+
- lib/selenium_plus/finders.rb
|
79
85
|
- lib/selenium_plus/page_obj/container.rb
|
80
86
|
- lib/selenium_plus/page_obj/page.rb
|
81
87
|
- lib/selenium_plus/page_obj/section.rb
|
@@ -90,7 +96,7 @@ files:
|
|
90
96
|
- test_site/sections/info_section.rb
|
91
97
|
- test_site/test_project.rb
|
92
98
|
- test_site/test_site.rb
|
93
|
-
homepage:
|
99
|
+
homepage: https://github.com/shipuyao/selenium_plus
|
94
100
|
licenses: []
|
95
101
|
post_install_message:
|
96
102
|
rdoc_options: []
|
@@ -116,6 +122,8 @@ specification_version: 3
|
|
116
122
|
summary: ''
|
117
123
|
test_files:
|
118
124
|
- features/drivers.feature
|
125
|
+
- features/finders.feature
|
126
|
+
- features/step_definitions/finder_steps.rb
|
119
127
|
- features/step_definitions/general_steps.rb
|
120
128
|
- features/step_definitions/tables_steps.rb
|
121
129
|
- features/support/env.rb
|