Sha256: 752ec148978c036ea53f603c9bb72dbfb03373bd53a2175a526471ad599b64c5
Contents?: true
Size: 594 Bytes
Versions: 7
Compression:
Stored size: 594 Bytes
Contents
# encoding: utf-8 # !/usr/bin/env ruby require 'fileutils' # metodo para tira screenshot e imbutir no relatorio html module Helper def take_screenshot(file_name, result) file_path = "results/screenshots/test_#{result}" screenshot = "#{file_path}/#{file_name}.png" page.save_screenshot(screenshot) embed(screenshot, 'image/png', 'Click here') end def wait_for_ajax Timeout.timeout(Capybara.default_max_wait_time) do loop until finished_all_ajax_requests? end end def finished_all_ajax_requests? page.evaluate_script('jQuery.active').zero? end end
Version data entries
7 entries across 7 versions & 1 rubygems