Class: HTMLCS

Inherits:
Object
  • Object
show all
Defined in:
lib/html_cs_run_parse.rb

Overview

this gem is specifically for running HTMLCS

Class Method Summary collapse

Class Method Details

.compile_html_cs(data_location) ⇒ Object



14
15
16
17
# File 'lib/html_cs_run_parse.rb', line 14

def self.compile_html_cs(data_location)
  exec = Execution.new
  exec.build(data_location)
end

.run_html_cs(browser, file_name) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/html_cs_run_parse.rb', line 6

def self.run_html_cs(browser, file_name)
  browser.execute_script(File.read(File.expand_path("../HTMLCS.js", __FILE__)))
  browser.execute_script("HTMLCS_RUNNER.run('WCAG2AA')")
  output = browser.driver.manage.logs.get(:browser)
  parse = ParseMachine.new
  parse.htmlcs_parse(output, file_name)
end