Exemple #1
0
 def _url_from_path(self, source, destination):
     if not destination:
         return None
     return get_link_path(destination, os.path.dirname(source))
 def _embed_screenshot(self, path, width):
     link = utils.get_link_path(path, self._log_dir)
     logger.info('<a href="%s"><img src="%s" width="%s"></a>' %
                 (link, link, width),
                 html=True)
 def _link_screenshot(self, path):
     link = utils.get_link_path(path, self._log_dir)
     logger.info("Screenshot saved to '<a href=\"%s\">%s</a>'." %
                 (link, path),
                 html=True)
Exemple #4
0
 def _get_relative_source(self, source):
     if not source or not self._output_path:
         return ""
     return get_link_path(source, os.path.dirname(self._output_path))
Exemple #5
0
 def relative_source(self, source):
     rel_source = get_link_path(source, self._log_dir) \
         if self._log_dir and source and os.path.exists(source) else ''
     return self.string(rel_source)
 def _get_relative_source(self, source):
     if not source or not self._output_path:
         return ''
     return get_link_path(source, os.path.dirname(self._output_path))
Exemple #7
0
 def _link_screenshot(self, path):
     link = utils.get_link_path(path, self._log_dir)
     logger.info("Screenshot saved to '<a href=\"%s\">%s</a>'."
                 % (link, path), html=True)
Exemple #8
0
 def _embed_screenshot(self, path, width):
     link = utils.get_link_path(path, self._log_dir)
     logger.info('<a href="%s"><img src="%s" width="%s"></a>'
                 % (link, link, width), html=True)