This repository has been archived by the owner on Jun 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.ejs
50 lines (48 loc) · 1.65 KB
/
index.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Capture test slave</title>
<link rel="stylesheet" type="text/css" href="/stylesheets/buster.css">
<link rel="stylesheet" type="text/css" href="/stylesheets/buster-server.css">
</head>
<body>
<div id="masthead">
<p><a href="/"><%- name %></a> Test automator</p>
</div>
<div class="content">
<h1>Capture browser as test slave</h1>
<p>
Hit the button below, then leave the browser running. <%- name %> can
then use it to automate test runs for you.
</p>
<p class="button"><a href="/capture">Capture browser</a></p>
<% if (slaves.length > 0) { %>
<h2>Captured slaves (<%= slaves.length %>)</h2>
<ol class="browsers">
<% for (var i = 0, l = slaves.length; i < l; ++i) { %>
<%
var agent = slaves[i], classes = [];
classes.push((agent.name || '').toLowerCase());
if (/windows/i.test(agent.os.family)) {
classes.push("windows");
} else if (/os x/i.test(agent.os.family)) {
classes.push("os_x");
} else {
classes.push(agent.os.family.toLowerCase().replace(/ /g, "_"));
}
%>
<li class="<%= classes.join(' ') %>">
<div>
<h3><%= agent.description %></h3>
<p><%= agent.ua %></p>
</div>
</li>
<% } %>
</ol>
<% } else { %>
<h2>No captured slaves</h2>
<% } %>
</div>
</body>
</html>