com.jspringbot.selenium.extension.UtilityHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jspringbot-selenium-extension Show documentation
Show all versions of jspringbot-selenium-extension Show documentation
This is a supporting library for jspringbot to use Browserstack and other selenium events
package com.jspringbot.selenium.extension;
import org.jspringbot.syntax.HighlightRobotLogger;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
/**
* Created by robertdeocampo on 04/01/2019.
*/
public class UtilityHelper {
public static final HighlightRobotLogger LOG = HighlightRobotLogger.getLogger(UtilityHelper.class);
public UtilityHelper() {
}
public void DeleteFile(String filepath){
File file = new File(filepath);
if(file.delete()){
LOG.keywordAppender().appendArgument("Deleted: ", filepath);
}
else {
LOG.keywordAppender().appendArgument("File not exist: ", filepath);
}
}
}