com.ats.tools.report.utils.HtmlActionUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ats-automated-testing Show documentation
Show all versions of ats-automated-testing Show documentation
Code generator library to create and execute GUI automated tests
The newest version!
package com.ats.tools.report.utils;
import com.ats.tools.report.models.Action;
import com.ats.tools.report.models.TestInfo;
public class HtmlActionUtils {
public static String buildSearchedElementHeader(Action action) {
switch (action.getError()) {
case "-1":
return "Searched elementelement_not_found #-1";
case "-2":
return "Searched elementelement_not_visible #-2";
case "-3":
return "Searched elementelement_not_interactable #-3";
default:
return "Searched element";
}
}
public static String buildSearchedElementData(Action action) {
return ""+action.getActionElement().getCriterias()+ " Elements found: "+ action.getActionElement().getFoundElements() + " Search duration: " +action.getActionElement().getSearchDuration() +" ms";
}
public static String getActionUrl(Action action, TestInfo testInfo) {
return testInfo.getProject().getProjectId() + "/script/" + action.getScript() + "/" + action.getLine();
}
public static String getActionUrl(TestInfo testInfo, String scriptName, String line) {
return testInfo.getProject().getProjectId() + "/script/" + scriptName + "/" + line;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy