Class UiEngineConfigurator
- java.lang.Object
-
- com.axway.ats.config.AbstractConfigurator
-
- com.axway.ats.uiengine.configuration.UiEngineConfigurator
-
public class UiEngineConfigurator extends AbstractConfigurator
This class is used to read a set of properties used by the UI Engine
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetBrowserActionTimeout()StringgetBrowserDownloadDir()StringgetBrowserDownloadMimeTypes()org.openqa.selenium.chrome.ChromeOptionsgetChromeDriverOptions()intgetCommandDelay()org.openqa.selenium.edge.EdgeOptionsgetEdgeDriverOptions()intgetElementStateChangeDelay()org.openqa.selenium.firefox.FirefoxOptionsgetFirefoxDriverOptions()booleangetHighlightElements()static UiEngineConfiguratorgetInstance()org.openqa.selenium.ie.InternetExplorerOptionsgetInternetExplorerDriverOptions()StringgetMapFilesBaseDir()intgetWaitPageToLoadTimeout()booleanisWorkWithInvisibleElements()Deprecated.To be removed as clicking on invisible elements is not recommendedprotected voidreloadData()voidsetBrowserActionTimeout(int actionTimeout)Overwrite the timeout in seconds for waiting a browser action to finish This method must be called before starting the browser.voidsetBrowserDownloadDir(String directory)Overwrite browser download directory (absolute path)voidsetBrowserDownloadMimeTypes(String downloadMimeTypes)Overwrite MIME types of files (comma separated) which will be automatically saved to disk by the browservoidsetChromeDriverOptions(org.openqa.selenium.chrome.ChromeOptions options)Pass options which will be applied when starting a Chrome browser through SeleniumvoidsetCommandDelay(int commandDelay)Overwrite the delay between UI commandvoidsetEdgeDriverOptions(org.openqa.selenium.edge.EdgeOptions options)Pass options which will be applied when starting a Edge browser through SeleniumvoidsetElementStateChangeDelay(int elementStateChangeDelay)Overwrite the delay waiting for element's state to change or to be foundvoidsetFirefoxDriverOptions(org.openqa.selenium.firefox.FirefoxOptions options)Pass options which will be applied when starting a Firefox browser through SeleniumvoidsetHighlightElements(boolean highlightElements)Overwrite whether will try to highlight elementsvoidsetInternetExplorerDriverOptions(org.openqa.selenium.ie.InternetExplorerOptions options)Pass options which will be applied when starting a Internet Explorer browser through SeleniumvoidsetMapFilesBaseDir(String mapFilesBaseDir)Overwrite the map files' root directoryvoidsetWaitPageToLoadTimeout(int pageLoadTimeout)Overwrite the timeout in seconds for waiting a web page to get loadedvoidsetWorkWithInvisibleElements(boolean workWithInvisibleElements)Deprecated.To be removed as clicking on invisible elements is not recommended-
Methods inherited from class com.axway.ats.config.AbstractConfigurator
addConfigFile, addConfigFileFromClassPath, clearCustomProperties, clearTempProperties, getBooleanProperty, getCharProperty, getIntegerProperty, getLongProperty, getOptionalProperty, getProperties, getProperty, setCustomProperty, setTempProperty
-
-
-
-
Method Detail
-
getInstance
public static UiEngineConfigurator getInstance()
-
getMapFilesBaseDir
public String getMapFilesBaseDir()
- Returns:
- the map files' root directory
-
setMapFilesBaseDir
public void setMapFilesBaseDir(String mapFilesBaseDir)
Overwrite the map files' root directory- Parameters:
mapFilesBaseDir- the map files' root directory
-
getCommandDelay
public int getCommandDelay()
- Returns:
- the delay between UI commands
-
setCommandDelay
public void setCommandDelay(int commandDelay)
Overwrite the delay between UI command- Parameters:
commandDelay- the delay between UI command
-
getElementStateChangeDelay
public int getElementStateChangeDelay()
- Returns:
- the delay waiting for element's state to change or to be found. In milliseconds
-
setElementStateChangeDelay
public void setElementStateChangeDelay(int elementStateChangeDelay)
Overwrite the delay waiting for element's state to change or to be found- Parameters:
elementStateChangeDelay- the delay waiting for element's state to change. In milliseconds
-
getHighlightElements
public boolean getHighlightElements()
- Returns:
- whether will try to highlight elements
-
setHighlightElements
public void setHighlightElements(boolean highlightElements)
Overwrite whether will try to highlight elements- Parameters:
highlightElements- whether will try to highlight elements
-
getBrowserActionTimeout
public int getBrowserActionTimeout()
- Returns:
- the timeout in seconds for waiting a browser action to finish
-
setBrowserActionTimeout
public void setBrowserActionTimeout(int actionTimeout)
Overwrite the timeout in seconds for waiting a browser action to finish This method must be called before starting the browser.- Parameters:
actionTimeout- a timeout in second for waiting a browser action to finish
-
reloadData
protected void reloadData()
- Specified by:
reloadDatain classAbstractConfigurator
-
getBrowserDownloadDir
public String getBrowserDownloadDir()
- Returns:
- browser download directory (absolute path)
-
setBrowserDownloadDir
public void setBrowserDownloadDir(String directory)
Overwrite browser download directory (absolute path)- Parameters:
directory- - browser download directory (absolute path)
-
getBrowserDownloadMimeTypes
public String getBrowserDownloadMimeTypes()
- Returns:
- MIME types of files (comma separated) which will be automatically saved to disk by the browser
-
setBrowserDownloadMimeTypes
public void setBrowserDownloadMimeTypes(String downloadMimeTypes)
Overwrite MIME types of files (comma separated) which will be automatically saved to disk by the browser- Parameters:
downloadMimeTypes- MIME types of files (comma separated) which will be automatically saved to disk by the browser
-
getWaitPageToLoadTimeout
public int getWaitPageToLoadTimeout()
- Returns:
- the timeout in seconds for waiting a web page to get loaded
-
setWaitPageToLoadTimeout
public void setWaitPageToLoadTimeout(int pageLoadTimeout)
Overwrite the timeout in seconds for waiting a web page to get loaded- Parameters:
pageLoadTimeout- the new timeout
-
isWorkWithInvisibleElements
@Deprecated public boolean isWorkWithInvisibleElements()
Deprecated.To be removed as clicking on invisible elements is not recommended- Returns:
trueif we will work with the invisible elements too
-
setWorkWithInvisibleElements
@Deprecated public void setWorkWithInvisibleElements(boolean workWithInvisibleElements)
Deprecated.To be removed as clicking on invisible elements is not recommended- Parameters:
workWithInvisibleElements- whether to work with the invisible elements too
-
getChromeDriverOptions
public org.openqa.selenium.chrome.ChromeOptions getChromeDriverOptions()
- Returns:
- the Chrome options
-
setChromeDriverOptions
public void setChromeDriverOptions(org.openqa.selenium.chrome.ChromeOptions options)
Pass options which will be applied when starting a Chrome browser through Selenium- Parameters:
options- Chrome options
-
getFirefoxDriverOptions
public org.openqa.selenium.firefox.FirefoxOptions getFirefoxDriverOptions()
- Returns:
- the Firefox options
-
setFirefoxDriverOptions
public void setFirefoxDriverOptions(org.openqa.selenium.firefox.FirefoxOptions options)
Pass options which will be applied when starting a Firefox browser through Selenium- Parameters:
options- Firefox options
-
setInternetExplorerDriverOptions
public void setInternetExplorerDriverOptions(org.openqa.selenium.ie.InternetExplorerOptions options)
Pass options which will be applied when starting a Internet Explorer browser through Selenium- Parameters:
options- Internet Explorer options
-
getInternetExplorerDriverOptions
public org.openqa.selenium.ie.InternetExplorerOptions getInternetExplorerDriverOptions()
- Returns:
- the InternetExplorer options
-
setEdgeDriverOptions
public void setEdgeDriverOptions(org.openqa.selenium.edge.EdgeOptions options)
Pass options which will be applied when starting a Edge browser through Selenium- Parameters:
options- Internet Explorer options
-
getEdgeDriverOptions
public org.openqa.selenium.edge.EdgeOptions getEdgeDriverOptions()
- Returns:
- the Edge options
-
-