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

com.ats.tools.report.utils.HtmlActionUtils Maven / Gradle / Ivy

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 element
element_not_found #-1
"; case "-2": return "
Searched element
element_not_visible #-2
"; case "-3": return "
Searched element
element_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