Class | Selenium::RSpec::Reporting::FilePathStrategy
In: | lib/selenium/rspec/reporting/file_path_strategy.rb
Parent: | Object

### Methods

base_report_dir file_path file_path_for_browser_network_traffic file_path_for_html_capture file_path_for_page_screenshot file_path_for_remote_control_logs file_path_for_system_screenshot new relative_dir relative_file_path_for_browser_network_traffic relative_file_path_for_html_capture relative_file_path_for_page_screenshot relative_file_path_for_remote_control_logs relative_file_path_for_system_screenshot

### Constants

REPORT_DEFAULT_FILE_PATH | = | File.join(Dir::tmpdir, "selenium_test_report", "index.html")

### Attributes

final_report_file_path | [R] |

### Public Class methods

new(final_report_file_path)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 10
    10:         def initialize(final_report_file_path)
    11:           @final_report_file_path = final_report_file_path || REPORT_DEFAULT_FILE_PATH
    12:           @relative_dir = nil
    13:         end

### Public Instance methods

base_report_dir()

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 15
    15:         def base_report_dir
    16:           @base_report_dir ||= File.dirname(File.expand_path(@final_report_file_path))
    17:         end

file_path(relative_file_path)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 66
    66:         def file_path(relative_file_path)
    67:           the_file_path = base_report_dir + "/" + relative_file_path
    68:           parent_dir = File.dirname(the_file_path)
    69:           FileUtils.mkdir_p(parent_dir) unless File.directory?(parent_dir)
    70:           the_file_path
    71:         end

file_path_for_browser_network_traffic(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 62
    62:         def file_path_for_browser_network_traffic(example)
    63:           file_path relative_file_path_for_browser_network_traffic(example)
    64:         end

file_path_for_html_capture(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 46
    46:         def file_path_for_html_capture(example)
    47:           file_path relative_file_path_for_html_capture(example)
    48:         end

file_path_for_page_screenshot(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 54
    54:         def file_path_for_page_screenshot(example)
    55:           file_path relative_file_path_for_page_screenshot(example)
    56:         end

file_path_for_remote_control_logs(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 58
    58:         def file_path_for_remote_control_logs(example)
    59:           file_path relative_file_path_for_remote_control_logs(example)
    60:         end

file_path_for_system_screenshot(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 50
    50:         def file_path_for_system_screenshot(example)
    51:           file_path relative_file_path_for_system_screenshot(example)
    52:         end

relative_dir()

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 19
    19:         def relative_dir
    20:           return @relative_dir if @relative_dir
    21:
    22:           file_name_without_extension = File.basename(@final_report_file_path).sub(/\.[^\.]*$/, "")
    23:           @relative_dir ||=  "resources/" + file_name_without_extension
    24:         end

relative_file_path_for_browser_network_traffic(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 42
    42:         def relative_file_path_for_browser_network_traffic(example)
    43:           "#{relative_dir}/example_#{example.reporting_uid}_browser_network_traffic.log"
    44:         end

relative_file_path_for_html_capture(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 26
    26:         def relative_file_path_for_html_capture(example)
    27:           "#{relative_dir}/example_#{example.reporting_uid}.html"
    28:         end

relative_file_path_for_page_screenshot(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 34
    34:         def relative_file_path_for_page_screenshot(example)
    35:           "#{relative_dir}/example_#{example.reporting_uid}_page_screenshot.png"
    36:         end

relative_file_path_for_remote_control_logs(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 38
    38:         def relative_file_path_for_remote_control_logs(example)
    39:           "#{relative_dir}/example_#{example.reporting_uid}_remote_control.log"
    40:         end

relative_file_path_for_system_screenshot(example)

[Source]

        # File lib/selenium/rspec/reporting/file_path_strategy.rb, line 30
    30:         def relative_file_path_for_system_screenshot(example)
    31:           "#{relative_dir}/example_#{example.reporting_uid}_system_screenshot.png"
    32:         end

[Validate]