All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.testvagrant.optimus.core.screenshots.OptimusRunContext Maven / Gradle / Ivy

Go to download

Optimus Lite API to manage test devices and create appium driver based on platform

There is a newer version: 0.1.7-beta
Show newest version
package com.testvagrant.optimus.core.screenshots;

import com.testvagrant.optimus.core.models.TargetDetails;
import lombok.*;
import org.openqa.selenium.WebDriver;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OptimusRunContext {
  private WebDriver webDriver;
  private Path testFolder;

  @Builder.Default private List targets = new ArrayList<>();

  public OptimusRunContext testPath(String className, String testName) {
    testFolder =
        Paths.get(
            System.getProperty("user.dir"),
            "build",
            "optimus-execution-timeline",
            className,
            testName);
    return this;
  }

  public OptimusRunContext addTarget(TargetDetails target) {
    targets.add(target);
    return this;
  }

  public OptimusRunContext addTarget(TargetDetails... target) {
    targets.addAll(Arrays.asList(target));
    return this;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy