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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9c5dafe68b48d9b049f6fa305420a4956b3a334
4
- data.tar.gz: 28d3f962ab45c3306ca9a88119d0450242a9ef83
3
+ metadata.gz: 4b8a551d62068225c2ba9b40f656f40637215c9f
4
+ data.tar.gz: f1094bfd2972a8c3aebfb032fb659644383734ec
5
5
  SHA512:
6
- metadata.gz: 33a027169d8361f54c1b042d52ec0ac6b152657a5901fc15a3d192ffb52d64235c19efa0b5a0b0696ecf74e7980b29ec987afe656f45ab5f99f180d31081fa60
7
- data.tar.gz: 9c2f0c7c9305684cb753e93d14ad49c7453d40ab0006c516457a1022ec769399dcad8a070f8a643e40221a2ddaacff729bf86d11a8b48de84dd9f7089ce389d5
6
+ metadata.gz: c4beaf58a5dd2bddc22a6addb339c37cba0c3bbf080957fd119185052d48dcbc33889c93e098c436556a2b0fcd8493777490d352954de095b651975662fc748d
7
+ data.tar.gz: 10c7baeee44798dfdf1d81afb7c0bfc3f9e0d4be85f5ed0aa80ab0e99362fea973b834de642b9c4934fe1e9fd53deca4c6bebd157861b59e6d83b09097776c28
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- selenium_standalone_dsl (0.1.6)
4
+ selenium_standalone_dsl (0.1.7)
5
5
  headless
6
6
  nokogiri
7
7
  selenium-webdriver
@@ -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 :text, text
65
+ select.select_by select_by, text
66
66
  end
67
67
 
68
68
  def has_element?(selector, find_by: :link_text)
@@ -1,3 +1,3 @@
1
1
  module SeleniumStandaloneDSL
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium_standalone_dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - gosho-kazuya