public class UtilsIndependent
extends java.lang.Object
Constructor and Description |
---|
UtilsIndependent() |
Modifier and Type | Method and Description |
---|---|
static void |
downloadURL(java.lang.String url,
java.io.File outfile)
Download the content from an URL and save it to a local file.
|
static void |
downloadURL(java.lang.String url,
java.io.File outfile,
boolean checkContent)
Download the content from an URL and save it to a local file.
|
static boolean |
isURLExist(java.lang.String url) |
static java.util.List<GenericProcessMonitor.ProcessInfo> |
killBrowserDriver(java.lang.String host,
java.lang.String browserName)
Kill the driver process by browserName.
|
static java.util.List<GenericProcessMonitor.ProcessInfo> |
killChromeDriver(java.lang.String host)
Kill the process 'chromedriver.exe' on windows, or "chromedrver" on linux.
|
static java.util.List<GenericProcessMonitor.ProcessInfo> |
killExtraProcess(java.lang.String host,
java.lang.String processName)
Kill the process launched from executables located in %SAFSDIR%\samples\Selenium2.0\extra\ or %SELENIUM_PLUS%\extra\
|
static java.util.List<GenericProcessMonitor.ProcessInfo> |
killGeckoDriver(java.lang.String host)
Kill the process 'geckodriver.exe/geckodriver_64.exe' on windows, or "geckodriver/geckodriver_64" on linux.
|
static java.util.List<GenericProcessMonitor.ProcessInfo> |
killIEDriverServer(java.lang.String host)
Kill the process 'IEDriverServer.exe'.
|
static java.util.List<GenericProcessMonitor.ProcessInfo> |
killMicrosoftWebDriver(java.lang.String host)
Kill the process 'MicrosoftWebDriver.exe'.
|
static java.util.List<GenericProcessMonitor.ProcessInfo> |
killMSEdgeDriver(java.lang.String host)
Kill the process 'msedgedriver.exe'.
|
static java.util.List<GenericProcessMonitor.ProcessInfo> |
killProcess(java.lang.String host,
java.lang.String processName,
java.lang.String commandline)
Kill the process according to the process name and partial command line.
|
static java.util.List<GenericProcessMonitor.ProcessInfo> |
killProcess(java.lang.String host,
java.lang.String processName,
java.lang.String commandline,
java.lang.String notCommandline)
Kill the process according to the process name and partial command line.
|
public static boolean isURLExist(java.lang.String url)
url
- String, the URL to verifypublic static void downloadURL(java.lang.String url, java.io.File outfile) throws java.io.IOException
url
- String, the URL to downloadoutfile
- File, the destination filejava.io.IOException
public static void downloadURL(java.lang.String url, java.io.File outfile, boolean checkContent) throws java.io.IOException
url
- String, the URL to downloadoutfile
- File, the destination filecheckContent
- boolean, if need to check the response contentjava.io.IOException
public static java.util.List<GenericProcessMonitor.ProcessInfo> killGeckoDriver(java.lang.String host) throws SAFSException
host
- String, the name of the machine on which the process 'geckodriver.exe' will be killed.SAFSException
public static java.util.List<GenericProcessMonitor.ProcessInfo> killChromeDriver(java.lang.String host) throws SAFSException
host
- String, the name of the machine on which the process 'chromedriver.exe' will be killed.SAFSException
public static java.util.List<GenericProcessMonitor.ProcessInfo> killIEDriverServer(java.lang.String host) throws SAFSException
host
- String, the name of the machine on which the process 'IEDriverServer.exe' will be killed.SAFSException
public static java.util.List<GenericProcessMonitor.ProcessInfo> killMicrosoftWebDriver(java.lang.String host) throws SAFSException
host
- String, the name of the machine on which the process 'MicrosoftWebDriver.exe' will be killed.SAFSException
public static java.util.List<GenericProcessMonitor.ProcessInfo> killMSEdgeDriver(java.lang.String host) throws SAFSException
host
- String, the name of the machine on which the process 'msedgedriver.exe' will be killed.SAFSException
public static java.util.List<GenericProcessMonitor.ProcessInfo> killBrowserDriver(java.lang.String host, java.lang.String browserName) throws SAFSException
host
- String, the name of the machine on which the driver process will be killed.browserName
- String, the name of the browser for which the driver process should be killed.SAFSException
public static java.util.List<GenericProcessMonitor.ProcessInfo> killExtraProcess(java.lang.String host, java.lang.String processName) throws SAFSException
host
- String, the name of machine on which the process will be killed.processName
- String, the name of process to kill. like chromedriver.exe, IEDriverServer.exe etc.SAFSException
public static java.util.List<GenericProcessMonitor.ProcessInfo> killProcess(java.lang.String host, java.lang.String processName, java.lang.String commandline) throws SAFSException
host
- String, the name of machine on which the process will be killed.processName
- String, the name of process to kill. like chromedriver.exe, IEDriverServer.exe, java.exe etc.commandline
- String, the partial commandline of the process to be killed.SAFSException
public static java.util.List<GenericProcessMonitor.ProcessInfo> killProcess(java.lang.String host, java.lang.String processName, java.lang.String commandline, java.lang.String notCommandline) throws SAFSException
host
- String, the name of machine on which the process will be killed.processName
- String, the name of process to kill. like chromedriver.exe, IEDriverServer.exe, java.exe etc.commandline
- String, the partial commandline of the process to be killed.notCommandline
- String, the partial commandline of the process NOT to be killed.SAFSException
Copyright © SAS Institute. All Rights Reserved.