-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathUtils.java
More file actions
47 lines (38 loc) · 1.53 KB
/
Utils.java
File metadata and controls
47 lines (38 loc) · 1.53 KB
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
import com.perfecto.reportium.client.ReportiumClient;
import com.perfecto.reportium.client.ReportiumClientFactory;
import com.perfecto.reportium.model.Job;
import com.perfecto.reportium.model.PerfectoExecutionContext;
import com.perfecto.reportium.model.Project;
import org.openqa.selenium.remote.RemoteWebDriver;
/**
* Utils class
*/
public class Utils {
static class Capabilities {
private static final String token = System.getenv("token");
private static final String host = System.getenv("host");
public static String getToken() {
return token;
}
public static String getHost() {
return host;
}
}
static class DigitalZoom {
/**
* Create a reportium client instance
* For more information about Perfecto DigitalZoom reporting, see http://developers.perfectomobile.com/display/PD/Reporting
*
* @return ReportiumClient
*/
public static ReportiumClient initReportiumClient(RemoteWebDriver driver) {
PerfectoExecutionContext perfectoExecutionContext = new PerfectoExecutionContext.PerfectoExecutionContextBuilder()
.withProject(new Project("Turbo Web", "1"))
.withJob(new Job("Job Name", 1))
.withContextTags("Turbo Web", "Web", "Selenium")
.withWebDriver(driver)
.build();
return new ReportiumClientFactory().createPerfectoReportiumClient(perfectoExecutionContext);
}
}
}