axe-core-selenium 4.10.2 → 4.10.3.pre.096e3f0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -4
  3. data/lib/axe-selenium.rb +6 -5
  4. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f11e21efeff55069a5bbd24936a294b5c95824fa5697f33338b2c80e02edd56e
4
- data.tar.gz: d87f186f33874aab741ed60d99378fcea768e75f6e56c44dac9955e7175437ac
3
+ metadata.gz: 6d813b0be907f4440304b5a20512949ecb378c05b9f07102915461575a107e6b
4
+ data.tar.gz: 798b9ff61e9d0b998b42f90a450c75b528569656517afcd68a4683d57d4db8b0
5
5
  SHA512:
6
- metadata.gz: a34a2d85884553bcfccb9ebd70ac2acb624857a46d6c06d95df25665ab6bee21a4fd932e2b0bc894802d8f31ba91189fa1a719cc01c04309631df6c069f6c6c0
7
- data.tar.gz: adb683a80bbc04acf3fa07e98be8f9bdde40262c6cd99844a75b30cfccd4c937cf55e3593f25205e42f16b022f39f0f925ceb2f3de3c452512be71750a598abf
6
+ metadata.gz: 1233c776ebccb9432271a5f9a959e98d4334397ededbebb75bc37dd3bce1ac6a0ca30d4dfd8b16cf8aef733420e6501d5f9b9fc5129abcfb119dca3df72c2446
7
+ data.tar.gz: 4958e8e43693cb5523b896fe4f04a51805c968980bc29901c42df4067bfb8d69ea6bd6d667e6f1e6ace48c0d41128f9a111699d5479b1d308c2b223c46820093
data/README.md CHANGED
@@ -20,7 +20,7 @@ require 'axe-selenium'
20
20
  # configure `AxeSelenium`
21
21
 
22
22
  driver = AxeSelenium.configure(:firefox) do |c|
23
- # see below for a full list of configuration
23
+ # see below for a full list of configuration
24
24
  c.jslib_path = "next-version/axe.js"
25
25
  end
26
26
 
@@ -28,7 +28,18 @@ end
28
28
  driver.page.navigate.to 'https://www.deque.com/'
29
29
  ```
30
30
 
31
- ### API
31
+ Custom options can be passed to the underlying driver:
32
+
33
+ ```rb
34
+ require 'axe-selenium'
35
+
36
+ options = Selenium::WebDriver::Options.firefox
37
+ options.args << '-headless'
38
+
39
+ driver = AxeSelenium.configure(:firefox, options) {}
40
+ ```
41
+
42
+ ### API
32
43
 
33
44
  #### `AxeSelenium.configure`
34
45
 
@@ -36,7 +47,7 @@ The configure method takes 1 optional argument as a [symbol][] and a configurati
36
47
 
37
48
  The optional argument is a browser name for `selenium-webdriver`. The valid browser names are:
38
49
  - `:firefox` (default)
39
- - `:chrome`
50
+ - `:chrome`
40
51
  - `:safari`
41
52
 
42
53
  > Note: Please ensure respective drivers (eg: [`geckodriver`][]) are installed in your machine.
@@ -67,4 +78,4 @@ bundle exec rspec
67
78
  [axe API]: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md
68
79
  [Selenium Webdriver]: https://rubygems.org/gems/selenium-webdriver
69
80
  [`geckodriver`]: https://github.com/mozilla/geckodriver/releases
70
- [symbol]: https://ruby-doc.org/core-2.5.0/Symbol.html
81
+ [symbol]: https://ruby-doc.org/core-2.5.0/Symbol.html
data/lib/axe-selenium.rb CHANGED
@@ -4,9 +4,10 @@ require "axe/configuration"
4
4
  module AxeSelenium
5
5
  # configure method
6
6
  # - which takes an optional argument browser
7
+ # - an optional options (sic) object to configure the underlying driver
7
8
  # - and a configuration block optional for Axe
8
- def self.configure(browser = :firefox)
9
- # instantiate axe configuration (singleton) with defaults or given config
9
+ def self.configure(browser = :firefox, opts = nil)
10
+ # instantiate axe configuration (singleton) with defaults or given config: opts
10
11
  if !block_given?
11
12
  raise Exception.new "Please provide a configure block for AxeSelenium"
12
13
  end
@@ -14,7 +15,7 @@ module AxeSelenium
14
15
  config = Axe::Configuration.instance
15
16
 
16
17
  # provide a selenium webdriver page object
17
- config.page = get_driver(browser)
18
+ config.page = get_driver(browser, opts)
18
19
 
19
20
  # await and return
20
21
  yield config
@@ -23,7 +24,7 @@ module AxeSelenium
23
24
 
24
25
  private
25
26
 
26
- def self.get_driver(browserSymbol)
27
- Selenium::WebDriver.for browserSymbol
27
+ def self.get_driver(browserSymbol, opts)
28
+ Selenium::WebDriver.for browserSymbol, options: opts
28
29
  end
29
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axe-core-selenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.10.2
4
+ version: 4.10.3.pre.096e3f0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deque Systems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-08 00:00:00.000000000 Z
11
+ date: 2025-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dumb_delegator
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.10.2
33
+ version: 4.10.3.pre.096e3f0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.10.2
40
+ version: 4.10.3.pre.096e3f0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -135,9 +135,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
135
  version: 2.3.0
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - ">="
138
+ - - ">"
139
139
  - !ruby/object:Gem::Version
140
- version: '0'
140
+ version: 1.3.1
141
141
  requirements: []
142
142
  rubygems_version: 3.2.32
143
143
  signing_key: