Module: Seleniumrc::TestUnitDsl
- Included in:
- SeleniumDsl
- Defined in:
- lib/seleniumrc/dsl/test_unit_dsl.rb
Instance Method Summary collapse
-
#assert_attribute(locator, value) ⇒ Object
Assert and wait for the locator attribute to have a value.
-
#assert_checked(locator) ⇒ Object
Assert and wait for locator check box to be checked.
-
#assert_element_contains(locator, text, options = {}) ⇒ Object
Assert and wait for locator element to contain text.
-
#assert_element_does_not_contain_text(locator, text, options = {}) ⇒ Object
(also: #assert_element_does_not_contain, #wait_for_element_to_not_contain_text)
Assert and wait for locator element to not contain text.
-
#assert_element_not_present(locator, params = {}) ⇒ Object
Assert and wait for locator element to not be present.
-
#assert_element_present(locator, params = {}) ⇒ Object
Assert and wait for locator element to be present.
-
#assert_location_ends_in(ends_with, options = {}) ⇒ Object
Assert browser url ends with passed in url.
-
#assert_next_sibling(locator, expected_sibling_id, options = {}) ⇒ Object
Assert and wait for the element with id next sibling is the element with id expected_sibling_id.
-
#assert_not_checked(locator) ⇒ Object
Assert and wait for locator check box to not be checked.
- #assert_not_visible(locator, options = {}) ⇒ Object
-
#assert_selected(locator, value) ⇒ Object
Assert and wait for locator select element to have value option selected.
-
#assert_text(locator, text, options = {}) ⇒ Object
Assert and wait for locator element to have text equal to passed in text.
-
#assert_text_in_order(locator, *text_fragments) ⇒ Object
(also: #wait_for_text_in_order)
Assert and wait for locator element has text fragments in a certain order.
-
#assert_text_not_present(pattern, options = {}) ⇒ Object
Assert and wait for page to not contain text.
-
#assert_text_present(pattern, options = {}) ⇒ Object
Assert and wait for page to contain text.
-
#assert_title(title, params = {}) ⇒ Object
—— Assertions and Conditions Assert and wait for the page title.
-
#assert_value(locator, value) ⇒ Object
Assert and wait for the locator element to have value.
- #assert_visible(locator, options = {}) ⇒ Object
Instance Method Details
#assert_attribute(locator, value) ⇒ Object
Assert and wait for the locator attribute to have a value.
25 26 27 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 25 def assert_attribute(locator, value) element(locator).has_attribute(value) end |
#assert_checked(locator) ⇒ Object
Assert and wait for locator check box to be checked.
35 36 37 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 35 def assert_checked(locator) element(locator).is_checked end |
#assert_element_contains(locator, text, options = {}) ⇒ Object
Assert and wait for locator element to contain text.
60 61 62 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 60 def assert_element_contains(locator, text, = {}) element(locator).contains_text(text, ) end |
#assert_element_does_not_contain_text(locator, text, options = {}) ⇒ Object Also known as: assert_element_does_not_contain, wait_for_element_to_not_contain_text
Assert and wait for locator element to not contain text.
65 66 67 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 65 def assert_element_does_not_contain_text(locator, text, ={}) element(locator).does_not_contain_text(text, ) end |
#assert_element_not_present(locator, params = {}) ⇒ Object
Assert and wait for locator element to not be present.
55 56 57 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 55 def assert_element_not_present(locator, params = {}) element(locator).is_not_present(params) end |
#assert_element_present(locator, params = {}) ⇒ Object
Assert and wait for locator element to be present.
50 51 52 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 50 def assert_element_present(locator, params = {}) element(locator).is_present(params) end |
#assert_location_ends_in(ends_with, options = {}) ⇒ Object
Assert browser url ends with passed in url.
77 78 79 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 77 def assert_location_ends_in(ends_with, ={}) page.url_ends_with(ends_with, ) end |
#assert_next_sibling(locator, expected_sibling_id, options = {}) ⇒ Object
Assert and wait for the element with id next sibling is the element with id expected_sibling_id.
72 73 74 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 72 def assert_next_sibling(locator, expected_sibling_id, = {}) element(locator).has_next_sibling(expected_sibling_id, ) end |
#assert_not_checked(locator) ⇒ Object
Assert and wait for locator check box to not be checked.
40 41 42 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 40 def assert_not_checked(locator) element(locator).is_not_checked end |
#assert_not_visible(locator, options = {}) ⇒ Object
91 92 93 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 91 def assert_not_visible(locator, = {}) element(locator).is_not_visible() end |
#assert_selected(locator, value) ⇒ Object
Assert and wait for locator select element to have value option selected.
30 31 32 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 30 def assert_selected(locator, value) element(locator).has_selected(value) end |
#assert_text(locator, text, options = {}) ⇒ Object
Assert and wait for locator element to have text equal to passed in text.
45 46 47 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 45 def assert_text(locator, text, ={}) element(locator).has_text(text, ) end |
#assert_text_in_order(locator, *text_fragments) ⇒ Object Also known as: wait_for_text_in_order
Assert and wait for locator element has text fragments in a certain order.
82 83 84 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 82 def assert_text_in_order(locator, *text_fragments) element(locator).has_text_in_order(*text_fragments) end |
#assert_text_not_present(pattern, options = {}) ⇒ Object
Assert and wait for page to not contain text.
15 16 17 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 15 def assert_text_not_present(pattern, = {}) page.is_text_not_present(pattern, ) end |
#assert_text_present(pattern, options = {}) ⇒ Object
Assert and wait for page to contain text.
10 11 12 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 10 def assert_text_present(pattern, = {}) page.is_text_present(pattern, ) end |
#assert_title(title, params = {}) ⇒ Object
—— Assertions and Conditions Assert and wait for the page title.
5 6 7 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 5 def assert_title(title, params={}) page.has_title(title, params) end |
#assert_value(locator, value) ⇒ Object
Assert and wait for the locator element to have value.
20 21 22 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 20 def assert_value(locator, value) element(locator).has_value(value) end |
#assert_visible(locator, options = {}) ⇒ Object
87 88 89 |
# File 'lib/seleniumrc/dsl/test_unit_dsl.rb', line 87 def assert_visible(locator, = {}) element(locator).is_visible() end |