Class PropertyFileManager
java.lang.Object
com.shaft.properties.internal.PropertyFileManager
Utility class for loading property files and resolving Appium desired capabilities.
Handles discovery of custom and default property files, and maps mobile-prefixed
properties into
MutableCapabilities for Appium sessions.-
Method Summary
Modifier and TypeMethodDescriptionstatic org.openqa.selenium.MutableCapabilitiesstatic StringResolves the Log4j2 configuration path, preferring the copied/custom properties file and falling back to the bundled default file when the custom file has not been created yet.static StringResolves the effective Log4j file-appender path using the typed Log4j properties.static voidstatic StringResolves the bundled default properties folder from the runtime classpath.static StringresolveClasspathResourceLocation(URL resourceUrl) Converts a classpath resource URL into a filesystem or jar location string.static StringResolves the bundledcustom.propertiestemplate used during engine bootstrap.
-
Method Details
-
getAppiumDesiredCapabilities
-
getCustomWebDriverDesiredCapabilities
public static org.openqa.selenium.MutableCapabilities getCustomWebDriverDesiredCapabilities() -
getLog4jConfigPath
Resolves the Log4j2 configuration path, preferring the copied/custom properties file and falling back to the bundled default file when the custom file has not been created yet.- Returns:
- the Log4j2 configuration file path to use during logger initialization
-
resolveBundledDefaultPropertiesFolderPath
Resolves the bundled default properties folder from the runtime classpath.- Returns:
- an absolute filesystem path when running from compiled classes, a jar URL for external runs, or the module-relative default folder when the resource is absent
-
resolveCustomPropertiesTemplatePath
Resolves the bundledcustom.propertiestemplate used during engine bootstrap.- Returns:
- the preferred on-disk template path when present, otherwise the classpath location
-
resolveClasspathResourceLocation
Converts a classpath resource URL into a filesystem or jar location string.- Parameters:
resourceUrl- classpath resource URL- Returns:
- resolved location suitable for
FileActionscopy helpers
-
getLogFilePath
Resolves the effective Log4j file-appender path using the typed Log4j properties.- Returns:
- the effective log file path for retry diagnostics and full-log attachments
-
getCustomBrowserstackCapabilities
-
readCustomPropertyFiles
public static void readCustomPropertyFiles()
-