selenium_standalone_dsl 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/selenium_standalone_dsl/base.rb +2 -2
- data/lib/selenium_standalone_dsl/version.rb +1 -1
- data/spec/base_spec.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b8a551d62068225c2ba9b40f656f40637215c9f
|
4
|
+
data.tar.gz: f1094bfd2972a8c3aebfb032fb659644383734ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4beaf58a5dd2bddc22a6addb339c37cba0c3bbf080957fd119185052d48dcbc33889c93e098c436556a2b0fcd8493777490d352954de095b651975662fc748d
|
7
|
+
data.tar.gz: 10c7baeee44798dfdf1d81afb7c0bfc3f9e0d4be85f5ed0aa80ab0e99362fea973b834de642b9c4934fe1e9fd53deca4c6bebd157861b59e6d83b09097776c28
|
data/Gemfile.lock
CHANGED
@@ -54,7 +54,7 @@ module SeleniumStandaloneDSL
|
|
54
54
|
@driver.switch_to.alert.accept
|
55
55
|
end
|
56
56
|
|
57
|
-
def select(text, from: nil, find_by: :name)
|
57
|
+
def select(text, select_by: :text, from: nil, find_by: :name)
|
58
58
|
return if !from
|
59
59
|
|
60
60
|
# For legacy sites using Frame
|
@@ -62,7 +62,7 @@ module SeleniumStandaloneDSL
|
|
62
62
|
@driver.find_element(find_by, from)
|
63
63
|
end
|
64
64
|
select = Selenium::WebDriver::Support::Select.new(element)
|
65
|
-
select.select_by
|
65
|
+
select.select_by select_by, text
|
66
66
|
end
|
67
67
|
|
68
68
|
def has_element?(selector, find_by: :link_text)
|
data/spec/base_spec.rb
CHANGED
@@ -42,6 +42,7 @@ describe SeleniumStandaloneDSL::Base do
|
|
42
42
|
@driver.visit 'http://localhost:4567/select'
|
43
43
|
expect { @driver.select('an option', from: 'select_box') }.not_to raise_error
|
44
44
|
expect { @driver.select('an option', from: 'select_box', find_by: :name) }.not_to raise_error
|
45
|
+
expect { @driver.select('1', select_by: :value, from: 'select_box', find_by: :name) }.not_to raise_error
|
45
46
|
end
|
46
47
|
|
47
48
|
it 'determine if the page has the text' do
|