cello 0.0.12 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/.gitignore +2 -0
  2. data/Gemfile +5 -2
  3. data/README.md +44 -39
  4. data/Rakefile +5 -0
  5. data/cello.gemspec +6 -1
  6. data/examples/bugbang/pages/home.rb +1 -1
  7. data/features/access_element.feature +4 -4
  8. data/features/browser.feature +25 -0
  9. data/features/button.feature +4 -0
  10. data/features/dsl.feature +21 -0
  11. data/features/element.feature +9 -4
  12. data/features/get_html_attributes.feature +30 -0
  13. data/features/pages/firefox.rb +12 -0
  14. data/features/pages/input_fields.rb +10 -4
  15. data/features/pages/response_page.rb +17 -0
  16. data/features/radio.feature +85 -0
  17. data/features/select.feature +29 -0
  18. data/features/site/inputs.html +38 -0
  19. data/features/site/read_page.html +23 -0
  20. data/features/step_definitions/browser.rb +55 -0
  21. data/features/step_definitions/common_steps.rb +15 -3
  22. data/features/step_definitions/element.rb +6 -10
  23. data/features/step_definitions/html_attributes.rb +13 -0
  24. data/features/step_definitions/radio.rb +55 -0
  25. data/features/step_definitions/select.rb +39 -0
  26. data/features/step_definitions/textarea.rb +33 -8
  27. data/features/step_definitions/textfield.rb +46 -9
  28. data/features/textarea.feature +30 -4
  29. data/features/textfield.feature +36 -6
  30. data/lib/cello/structure/browser.rb +52 -0
  31. data/lib/cello/{button_helper.rb → structure/html_elements/button_helper.rb} +0 -0
  32. data/lib/cello/{Checkbox_helper.rb → structure/html_elements/checkbox_helper.rb} +0 -0
  33. data/lib/cello/{div_helper.rb → structure/html_elements/div_helper.rb} +0 -0
  34. data/lib/cello/structure/html_elements/dsl.rb +10 -0
  35. data/lib/cello/{element_helper.rb → structure/html_elements/element_helper.rb} +8 -3
  36. data/lib/cello/{hidden_helper.rb → structure/html_elements/hidden_helper.rb} +0 -0
  37. data/lib/cello/{link_helper.rb → structure/html_elements/link_helper.rb} +0 -0
  38. data/lib/cello/structure/html_elements/radio_helper.rb +55 -0
  39. data/lib/cello/structure/html_elements/select_helper.rb +27 -0
  40. data/lib/cello/{span_helper.rb → structure/html_elements/span_helper.rb} +0 -0
  41. data/lib/cello/{textarea_helper.rb → structure/html_elements/textarea_helper.rb} +7 -7
  42. data/lib/cello/{textfield_helper.rb → structure/html_elements/textfield_helper.rb} +6 -6
  43. data/lib/cello/structure/page.rb +19 -0
  44. data/lib/cello/version.rb +1 -1
  45. data/lib/cello.rb +4 -0
  46. data/spec/button_spec.rb +6 -0
  47. data/spec/checkbox_spec.rb +14 -0
  48. data/spec/div_spec.rb +6 -0
  49. data/spec/element_spec.rb +19 -0
  50. data/spec/hidden_spec.rb +6 -0
  51. data/spec/link_spec.rb +6 -0
  52. data/spec/page_spec.rb +20 -0
  53. data/spec/radio_spec.rb +18 -0
  54. data/spec/select_spec.rb +12 -0
  55. data/spec/span_spec.rb +6 -0
  56. data/spec/spec_helper.rb +7 -0
  57. data/spec/textarea_spec.rb +24 -0
  58. data/spec/textfield_spec.rb +24 -0
  59. data/travis.yml +7 -0
  60. metadata +134 -24
  61. data/features/get_html_atributes.feature +0 -6
  62. data/lib/cello/config/cucumber_config.rb +0 -13
  63. data/lib/cello/page.rb +0 -44
  64. data/lib/cello/radio_helper.rb +0 -11
  65. data/lib/cello/select_helper.rb +0 -14
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
1
  *.sw*
2
+ *.gem
2
3
  *.lock
3
4
  screenshot.png
5
+ coverage/*
data/Gemfile CHANGED
@@ -1,8 +1,11 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'selenium-webdriver'
3
+ gem 'pry'
4
+ gem 'simplecov'
5
+ gem 'watir-webdriver'
4
6
  gem 'cucumber'
5
7
  gem 'rake'
6
-
8
+ gem 'headless'
9
+ gem 'rspec'
7
10
 
8
11
  gemspec
data/README.md CHANGED
@@ -1,33 +1,35 @@
1
1
  CELLO
2
2
  =====
3
3
 
4
+ [![Build Status](https://secure.travis-ci.org/camiloribeiro/cello.png)](http://travis-ci.org/camiloribeiro/cello])
5
+
4
6
  What?
5
7
  -----
6
- Cello is a Framework for automated UI tests based on Watir-Webdriver and Selenium-Webdriver in ruby, extended by metaprogramming and magic to implement something based on page object model and describe the behaviour with cucumber.
8
+ Cello is a framework for automated web UI tests based on Watir-Webdriver. It uses the [Cucumber](http://cukes.info/) readable behavior specification language to specify tests based on the Page Object Model. It is written in Ruby, and extended by metaprogramming and magic.
7
9
 
8
- This framework isn't realeased or stable yet, but the concept is already done. The concept consists in a way to implement tests faster like when we record using tools like seleium IDE, but using magic and metaprogramming instead all that terrible bullshit code generated by those tools.
10
+ This framework isn't officially released or stable yet, but the concept is already done. It consists in a way to implement tests fast, like when we record using tools like the Seleium IDE, but without all the terrible code generated by those tools.
9
11
 
10
- What a funny name :-p
12
+ What a funny name :-p!
11
13
  ----------------------
12
- The name is cello, not just because I love it, but because as a music composition are steps that, when syncronized guide the musician to play wonderful songs, the acceptance automated tests are steps that when syncronized guide the developer to keep coding wonderfull peaces of business value.
14
+ The name is Cello not just because I play and love it, but because as a music composition consists of steps that when synchronized guide the musician to play wonderful songs, the acceptance automated tests are steps that when synchronized guide the developer to keep coding wonderful pieces of business value.
15
+
13
16
 
14
17
  What is the idea?
15
18
  -----------------
16
- The core idea is based on two tecniques and a lots of ideas:
17
- *The first one is the Page-Object Model that provide a way to make tests more maintainable
18
- *The second one is the record but not replay that allows people without programming skills generate automated regression tests in a easier and faster way
19
+ The core idea is based on two techniques and lots of ideas:
19
20
 
20
- No one technique is required, but the first one is really recommended
21
+ * The first one is the Page-Object Model, that provides a way to make tests more maintainable.
22
+ * The second one is the "record but not replay", that allows people without programming skills generate automated regression tests in an easier and faster way.
21
23
 
22
- We still have to much work to do ( as you can see in right bellow in this document), but, if you want, you can fork it and have fun!
24
+ No one technique is mandatory, but the first one is strongly recommended.
23
25
 
24
- It's STRONGLY recommended do not use it for comercial projects, because it will change too much and we never tested it in a real project. We recomend you use it to emulate a project and, if possible, return us you example to be added on our library.
26
+ We still have to much work to do (as you can see further below, in this very document), but, if you want, you can fork it and have fun!
25
27
 
28
+ It's STRONGLY recommended to not use it for commercial projects just yet, because it will change too much and we never tested it in a real project. We recommend you use it to emulate a project and, if possible, send us your example to be added on our library.
26
29
 
27
- The way we choose to test our framework was . . . writing tests with it! This way we keep a stable version of it, we can overcome the limitations writing new features to cover the tests that wasn't working and build a library of examples to future users.
28
-
29
- So, that way, if you are not a developer but a awesome QA with a little experience with code, you can help us practicing this tool in a little bit in your free time, and we will try make you happy fixing the bugs and implementing the new features you find during the time you'll spend writing tests. This examples will be storage on our repository with your name, mail, blog link or what you want.
30
+ The way we chose to test our framework was... writing tests with it! This way we keep a stable version of it, and we can overcome the limitations of writing new features to cover the tests that weren't working and build a library of examples to future users.
30
31
 
32
+ So, this way, if you are not a developer, but an awesome QA with a little experience with code, you can help us by exploring this tool a little bit in your free time, and we will try make you happy fixing the bugs and implementing the new features you end up suggesting by writing great tests. These examples will be stored on our repository with your author credentials.
31
33
 
32
34
 
33
35
  Instructions
@@ -40,9 +42,10 @@ To develop `cello`, you are going to need [Bundler][1]
40
42
  $ git clone git@github.com:camiloribeiro/cello.git
41
43
  $ cd cello
42
44
  $ bundle install
43
- $ rake run
45
+ $ rake
46
+
47
+ The last step is launching the regression tests and all should be green.
44
48
 
45
- The last step launch the regression tests and it should be everything green
46
49
  If you have any problems, please let us know.
47
50
 
48
51
  [1]: http://gembundler.com
@@ -50,40 +53,42 @@ If you have any problems, please let us know.
50
53
  Using
51
54
  -----
52
55
 
53
- To use it you will need the developing env described in this document
54
- Then you can follow the example bugbang inside the directory cello/example
56
+ To use it you will need the development environment described in this document. Then you can follow the `bugbang` example inside the `cello/example` directory.
57
+
58
+ Soon I will provide more use descriptions :)
59
+
60
+ FEATURED
61
+ ========
62
+
63
+ - X-Platform: It does not matter if you are a Apple fan, A linux hard user or a windows geek. You can use it ;)
64
+
65
+ - X-Browser Running: You can create different browsers to different tests, and can use it in parallel
66
+
67
+ - Agnostic approach: You can choose between classical script, BDD, Object Oriented tests and hybrid tests to structure your tests. Also there is not a particular BDD tool to use it.
68
+
69
+ - Restricted and unrestricted interface: By nature, you can do only do what an user can do, example: It is not possível to access non visible/enabled elements. Also can use the common Watir common interface to access them if necessary, therefore, it is not recommended.
70
+
71
+ - Easy DSL: You will be able to create your DSL soon, but for while you have a simple DSL to work with.
72
+
73
+ - Rspec asserssion: Even without a mandatody Rspec approach, you can use the 'should/should_not' assertions in your testings
55
74
 
56
- Soon I will provide a new use description :)
57
75
 
58
76
  ROADMAP
59
77
  =======
60
78
 
61
- 0.5 Partitura
62
- -------------
63
- -DSL: Based framework that consists on a metaprogramming way to create customized test methods to each single project using a new DSL to provide test methods in execution time using only one line description for each element.
64
- -Selenium: Change watir-webdriver to selenium
65
- -Cukes: Cucumber by nature
79
+ - DSL: Based framework that consists on a metaprogramming way to create customized test methods to each single project using a new DSL to provide test methods in execution time using only one line description for each element.
80
+
81
+ - Selenium: Change Watir-webdriver to Selenium
66
82
 
67
- 1.0 Tabulatura
68
- --------------
69
- -Gem: Creat the cello gem that will:
70
- *Create project
71
- *Get a page and write the elements in the page
72
- -No Browser: Headless browser execution
83
+ - Gem: Create the cello gem that will:
73
84
 
74
- 1.5 Ocarine
75
- -----------
76
- -DDT: Data driven testing by nature
77
- -No Cukes: Provide a way to work with other BDD tools
78
- -XTest: X-browser Testing by nature
85
+ * Create project
79
86
 
80
- 2.0 Orquestra
81
- -------------
82
- -No Selenium: Provide a way to choose at least Watir or selenium
83
- -Scala: Create a copu for scala and java users
87
+ * Get a page and write the elements in the page
84
88
 
89
+ - DDT: Data driven testing by nature
85
90
 
86
- LICENCE
91
+ LICENSE
87
92
  =======
88
93
 
89
94
  Copyright 2012 Camilo Ribeiro cribeiro@thoughtworks.com
data/Rakefile CHANGED
@@ -1,4 +1,9 @@
1
1
  require "cucumber/rake/task"
2
+ require 'rspec/core/rake_task'
3
+
4
+ task :default => [:spec,:run]
5
+
6
+ Spec::Rake::SpecTask.new(:spec)
2
7
 
3
8
  Cucumber::Rake::Task.new(:run) do |task|
4
9
  task.cucumber_opts = ["-t","~@pending","features --format pretty"]
data/cello.gemspec CHANGED
@@ -20,10 +20,15 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.require_paths = ["lib"]
22
22
 
23
+ s.add_development_dependency 'simplecov'
24
+ s.add_development_dependency 'pry'
23
25
  s.add_development_dependency 'cucumber'
26
+ s.add_development_dependency 'watir-webdriver'
24
27
  s.add_development_dependency 'rake'
28
+ s.add_development_dependency 'rspec'
29
+ s.add_development_dependency 'headless'
25
30
 
26
31
  s.add_dependency 'cucumber'
32
+ s.add_dependency 'rspec'
27
33
  s.add_dependency 'watir-webdriver'
28
- s.add_dependency 'selenium-webdriver'
29
34
  end
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '../../../lib/cello/page')
1
+ require File.join(File.dirname(__FILE__), '../../../lib/cello/structure/page')
2
2
 
3
3
  module BugBang
4
4
  class HomePage < Cello::Structure::Page
@@ -2,21 +2,21 @@ Feature: Access elements
2
2
  As developer
3
3
  I want access elements in diferent ways
4
4
 
5
- Scenario: Write in a element text field sing id
5
+ Scenario: Write in a element textfield using id
6
6
  Given I am on a page that has a textfield
7
7
  Then I should be able to write "Test" in a element using id
8
8
 
9
- Scenario: Write in a element text field sing name
9
+ Scenario: Write in a element textfield using name
10
10
  Given I am on a page that has a textfield
11
11
  Then I should be able to write "Test" in a element using name
12
12
 
13
13
  @pending
14
- Scenario: Write in a element text field sing xpath
14
+ Scenario: Write in a element textfield using xpath
15
15
  Given I am on a page that has a textfield
16
16
  Then I should be able to write "Test" in a element using xpath
17
17
 
18
18
  @pending
19
- Scenario: Write in a element text field sing label related
19
+ Scenario: Write in a element textfield using label related
20
20
  Given I am on a page that has a textfield
21
21
  Then I should be able to write "Test" in a element using label
22
22
 
@@ -0,0 +1,25 @@
1
+ Feature: Browser
2
+ As a developer
3
+ I want use a browser in different contexts
4
+
5
+ Scenario: Get a context
6
+ Given I have a browser with no context (blank page)
7
+ When I ask for the context inputs
8
+ And and I ask to visit the page
9
+ Then I should see the page inputs
10
+
11
+ Scenario: Fill a textfield on a context
12
+ Given I am in the inputs context
13
+ When I ask for fill the textfield
14
+ Then I should see the filled textfield
15
+ And I should be able to close the browser
16
+
17
+ Scenario: Pass by two different contexts
18
+ Given I am in the inputs context
19
+ When I ask for fill the textfield
20
+ Then I should see the filled textfield
21
+ When I click on the simple page link
22
+ And I ask to use the simple page context
23
+ Then I should fail when try access the old textfield
24
+ And I should be able to verify the text on the new textfield
25
+ And I should be able to close the browser
@@ -0,0 +1,4 @@
1
+ Feature: Button
2
+ As developer
3
+ I want use button with different behaviours
4
+
@@ -0,0 +1,21 @@
1
+ Feature: DSL
2
+ As developer
3
+ I want to create my own interface to use this framework
4
+
5
+ @pending
6
+ Scenario: Keep the common DSL
7
+ Given I have the common dls defined
8
+ When I invoque a page that has all html elements
9
+ Then I should be able to run the follow methods:
10
+ | method |
11
+ | |
12
+
13
+ @pending
14
+ Scenario: Defining new DS
15
+ Given I have the follow dls defined on dls file:
16
+ | method | new_name |
17
+ | | |
18
+ When I invoque a page that has all html elements
19
+ Then I should be able to run the follow methods:
20
+ | method |
21
+ | |
@@ -2,15 +2,13 @@ Feature: Element
2
2
  As a developer
3
3
  I want use element to run my tests
4
4
 
5
- @pending
6
- Scenario: Use as element and send a native watir/selenium method
7
-
8
5
  Scenario: Click at the element
9
6
  Given I am on a page that has a element
10
7
  And that element is named as:
11
8
  | checkbox |
12
9
  | text_field |
13
10
  | textarea |
11
+ | radios |
14
12
  Then I want click on this element
15
13
 
16
14
  Scenario: Know if the element is visible
@@ -19,6 +17,7 @@ Feature: Element
19
17
  | checkbox |
20
18
  | text_field |
21
19
  | textarea |
20
+ | radios |
22
21
  Then I want know if this element is visible
23
22
 
24
23
  Scenario: Know if the element is enable
@@ -27,6 +26,7 @@ Feature: Element
27
26
  | checkbox |
28
27
  | text_field |
29
28
  | textarea |
29
+ | radios |
30
30
  Then I want know if this element is enable
31
31
 
32
32
  Scenario: Know if the element exists
@@ -35,14 +35,16 @@ Feature: Element
35
35
  | checkbox |
36
36
  | text_field |
37
37
  | textarea |
38
+ | radios |
38
39
  Then I want know if this element exists
39
40
 
40
- Scenario: Riht click at the element
41
+ Scenario: Right click at the element
41
42
  Given I am on a page that has a element
42
43
  And that element is named as:
43
44
  | checkbox |
44
45
  | text_field |
45
46
  | textarea |
47
+ | radios |
46
48
  Then I shoud be able to click with the right button in this element
47
49
 
48
50
  @pending
@@ -52,6 +54,7 @@ Feature: Element
52
54
  | checkbox |
53
55
  | text_field |
54
56
  | textarea |
57
+ | radios |
55
58
 
56
59
  @pending
57
60
  Scenario: Wait until the element is present
@@ -60,6 +63,7 @@ Feature: Element
60
63
  | checkbox |
61
64
  | text_field |
62
65
  | textarea |
66
+ | radios |
63
67
 
64
68
  @pending
65
69
  Scenario: get the location of it
@@ -68,4 +72,5 @@ Feature: Element
68
72
  | checkbox |
69
73
  | text_field |
70
74
  | textarea |
75
+ | radios |
71
76
  Then I should be able to get the location of it
@@ -0,0 +1,30 @@
1
+ Feature: Getting HTML Atributes
2
+ As Developer
3
+ I want to get HTML atributs from elements
4
+
5
+ Scenario: Get the value of a html element
6
+ Given I am on a page that has a element
7
+ And the textfield has the value "text value"
8
+ When I ask for the "value" of it element
9
+ Then I should see the value of it
10
+
11
+ @pending
12
+ Scenario: Get the text of a html element
13
+ Given I am on a page that has a element
14
+ And the textfield has the text "text text"
15
+ When I ask for the "text" of it element
16
+ Then I should see the text of it
17
+
18
+ @pending
19
+ Scenario: Get the class of a html element
20
+ Given I am on a page that has a element
21
+ And the textfield has the class "text_class"
22
+ When I ask for the "class" of it element
23
+ Then I should see the class of it
24
+
25
+ @pending
26
+ Scenario: Get the tilte of a html element
27
+ Given I am on a page that has a element
28
+ And the textfield has the title "text title"
29
+ When I ask for the "title" of it element
30
+ Then I should see the title of it
@@ -0,0 +1,12 @@
1
+ require File.join(File.dirname(__FILE__), '../../lib/cello')
2
+
3
+ module StaticPages
4
+ module Site
5
+ class Firefox < Cello::Structure::Browser
6
+
7
+ def initialize
8
+ super :firefox
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '../../lib/cello/page')
1
+ require File.join(File.dirname(__FILE__), '../../lib/cello')
2
2
 
3
3
  module StaticPages
4
4
  module Site
@@ -8,10 +8,16 @@ module StaticPages
8
8
  element :text_fieldxpath, :text_field, :xpah, '//*[@id="text1"]'
9
9
  element :checkbox, :checkbox, :id => 'check1'
10
10
  element :textarea, :textarea, :id => 'area1'
11
+ element :radios, :radios, :name => 'items'
12
+ element :select, :select, :id => 'select1'
13
+ element :link, :link, :id => 'link1'
14
+
15
+ def get_url
16
+ 'file://' + File.dirname(__FILE__) + '/../site/inputs.html'
17
+ end
11
18
 
12
- @@url = 'file://' + File.dirname(__FILE__) + '/../site/inputs.html'
13
- def initialize
14
- super(@@url)
19
+ def initialize(teste)
20
+ super(teste)
15
21
  end
16
22
  end
17
23
  end
@@ -0,0 +1,17 @@
1
+ require File.join(File.dirname(__FILE__), '../../lib/cello')
2
+
3
+ module StaticPages
4
+ module Site
5
+ class ResponsePage < Cello::Structure::Page
6
+ element :text, :text_field, :id => 'new_element'
7
+
8
+ def get_url
9
+ 'file://' + File.dirname(__FILE__) + '/../site/read_page.html'
10
+ end
11
+
12
+ def initialize(teste)
13
+ super(teste)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,85 @@
1
+ Feature: Radio
2
+ As a develper
3
+ I want to interact with radio elements
4
+
5
+ @pending
6
+ Scenario: See whitch option of a radio collection is setted
7
+ Given I am on a page that has a radio group with the follow opitions:
8
+ | cucumber |
9
+ | watir-webdriver |
10
+ | selenium-webdriver |
11
+ | ruby |
12
+ And the option "Ruby" is setted
13
+ Then I should be able to know that the option "Ruby" is setted
14
+
15
+ Scenario: See if a radio option is not setted
16
+ Given I am on a page that has a radio group with the follow opitions:
17
+ | cucumber |
18
+ | watir-webdriver |
19
+ | selenium-webdriver |
20
+ | ruby |
21
+ And the option "Ruby" is setted
22
+ Then I should be able to know if the option "Cucumber" is not setted
23
+
24
+ Scenario: See if a radio option is not setted (Counter Proof)
25
+ Given I am on a page that has a radio group with the follow opitions:
26
+ | cucumber |
27
+ | watir-webdriver |
28
+ | selenium-webdriver |
29
+ | ruby |
30
+ And the option "Cucumber" is setted
31
+ Then I should fail when ask if the the option "Cucumber" is not setted
32
+
33
+ Scenario: See if a radio option is setted
34
+ Given I am on a page that has a radio group with the follow opitions:
35
+ | cucumber |
36
+ | watir-webdriver |
37
+ | selenium-webdriver |
38
+ | ruby |
39
+ And the option "Ruby" is setted
40
+ Then I should be able to know if the option "Ruby" is setted
41
+
42
+ Scenario: See if a radio option is setted (counter proof)
43
+ Given I am on a page that has a radio group with the follow opitions:
44
+ | cucumber |
45
+ | watir-webdriver |
46
+ | selenium-webdriver |
47
+ | ruby |
48
+ Then I should fail when ask if the option "Ruby" is setted
49
+
50
+ Scenario: See if the radio collection has some option setted
51
+ Given I am on a page that has a radio group with the follow opitions:
52
+ | cucumber |
53
+ | watir-webdriver |
54
+ | selenium-webdriver |
55
+ | ruby |
56
+ And the option "Ruby" is setted
57
+ Then I should be able to know if there is some options setted
58
+
59
+ Scenario: See if the radio collection has some option setted
60
+ Given I am on a page that has a radio group with the follow opitions:
61
+ | cucumber |
62
+ | watir-webdriver |
63
+ | selenium-webdriver |
64
+ | ruby |
65
+ Then I should fail when ask if there is some options setted
66
+
67
+ Scenario: Select an radio option
68
+ Given I am on a page that has a radio group with the follow opitions:
69
+ | cucumber |
70
+ | watir-webdriver |
71
+ | selenium-webdriver |
72
+ | ruby |
73
+ And the option "Ruby" is setted
74
+ Then I should be able to select the option "Cucumber"
75
+ And I should be able to know if the option "Cucumber" is setted
76
+
77
+ Scenario: Select an radio option
78
+ Given I am on a page that has a radio group with the follow opitions:
79
+ | cucumber |
80
+ | watir-webdriver |
81
+ | selenium-webdriver |
82
+ | ruby |
83
+ And the option "Ruby" is setted
84
+ Then I should be able to select the option "Cucumber"
85
+ And I should fail when ask if the option "Ruby" is setted
@@ -0,0 +1,29 @@
1
+ Feature: Select
2
+ As a developer
3
+ I want to use select fields
4
+
5
+ Scenario: Get the values available
6
+ Given I am on a page that has a select
7
+ Then I should be able to get the options available of it
8
+
9
+ Scenario: Select a value
10
+ Given I am on a page that has a select
11
+ Then I should be able to select an option on it
12
+ And be sure that the option setted is the option selected
13
+
14
+ Scenario: Get selected
15
+ Given I am on a page that has a select
16
+ And the option "Cucumber" is selected
17
+ Then I should be able to know the option "Cucumber" is selected
18
+
19
+ Scenario: Get selected (counter proof)
20
+ Given I am on a page that has a select
21
+ And the option "Cucumber" is selected
22
+ Then I should fail when ask if the option "Rspec" is selected
23
+
24
+ #TODO: Think a way to create a default value
25
+ @pending
26
+ Scenario: Go to default or empty
27
+ Given I am on a page that has a select
28
+ And the option "Cucumber" is selected
29
+ Then I should be able to go to the default option of it
@@ -1,4 +1,7 @@
1
1
  <html>
2
+ <head>
3
+ <title> Inputs page </title>
4
+ </head>
2
5
  <div>
3
6
  This page is used to test Cello Framwork
4
7
  </div>
@@ -18,4 +21,39 @@
18
21
  <div>Textarea with id area1</div><div> <textarea id='area1'></textarea></div>
19
22
  </div>
20
23
  </div>
24
+ <div>
25
+ <div> <p><b>Radio:</b></p>
26
+ <input type="radio" name="items" value="Selenium-Webdriver">Selenium-Webdriver</input>
27
+ <input type="radio" name="items" value="Ruby">Ruby</input>
28
+ <input type="radio" name="items" value="Cucumber">Cucumber</input>
29
+ <input type="radio" name="items" value=">Watir-Webdriver">Watir-Webdriver</input>
30
+ </div>
31
+ </div>
32
+ <div>
33
+ <div> <p><b>Link:</b></p>
34
+ <div>Link to other page</div><div> <a id='link1' href='./read_page.html'>Link</a>
35
+ </div>
36
+ </div>
37
+ <div>
38
+ <div> <p><b>Simple Select:</b></p>
39
+ <div>Select example</div><div>
40
+ <select id="select1">
41
+ <option value="">...</option>
42
+ <option value="cello">Cello</option>
43
+ <option value="cucumber">Cucumber</option>
44
+ <option value="ruby">Ruby</option>
45
+ <option value="rspec">Rspec</option>
46
+ <option value="qa">QA Rocks!</option>
47
+ </select>
48
+ </div>
49
+ </div>
21
50
  </html>
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
@@ -0,0 +1,23 @@
1
+ <html>
2
+ <div>
3
+ Camilo
4
+ </div>
5
+ <div>
6
+ Ribeiro
7
+ </div>
8
+ <div>
9
+ Test
10
+ </div>
11
+ <div>
12
+ Testing
13
+ </div>
14
+ <div>
15
+ Foo
16
+ </div>
17
+ <div>
18
+ Bar
19
+ </div>
20
+ <div>
21
+ <input type="text" id="new_element" value="Worked Again!" >
22
+ </div>
23
+ </html>