Skip to main content

Complete Properties Reference

You can use these tab groups to navigate and get information about how to manage your desired properties in all the different ways possible.

The traditional way of configuring SHAFT properties, using this approach you can simply create your own custom.properties file.

Platform

  • These properties control the basic target execution platform settings, like execution location and target operating system.
import com.shaft.driver.SHAFT;
import org.openqa.selenium.Platform;

/** get **/
String crossBrowserMode = SHAFT.Properties.platform.crossBrowserMode();
String executionAddress = SHAFT.Properties.platform.executionAddress();
String targetPlatform = SHAFT.Properties.platform.targetPlatform();
String proxy = SHAFT.Properties.platform.proxy();
Boolean driverProxy = SHAFT.Properties.platform.driverProxySettings();
Boolean jvmProxy = SHAFT.Properties.platform.jvmProxySettings();
Boolean enableBiDi = SHAFT.Properties.platform.enableBiDi();

/** set **/
SHAFT.Properties.platform.set().crossBrowserMode("off");
SHAFT.Properties.platform.set().executionAddress("local");
SHAFT.Properties.platform.set().targetPlatform(Platform.LINUX.name());
SHAFT.Properties.platform.set().proxySettings("");
SHAFT.Properties.platform.set().driverProxySettings(true);
SHAFT.Properties.platform.set().jvmProxySettings(true);
SHAFT.Properties.platform.set().enableBiDi(true);

Web

  • These properties control web GUI test automation settings, like target browser, headless execution, and mobile emulation.
import com.shaft.driver.SHAFT;
import org.openqa.selenium.remote.Browser;

/** get **/
var targetBrowserName = SHAFT.Properties.web.targetBrowserName();
String targetBrowserName = SHAFT.Properties.web.targetBrowserName();
boolean headlessExecution = SHAFT.Properties.web.headlessExecution();
boolean forceBrowserDownload = SHAFT.Properties.web.forceBrowserDownload();
boolean incognitoMode = SHAFT.Properties.web.incognitoMode();
boolean isMobileEmulation = SHAFT.Properties.web.isMobileEmulation();
boolean mobileEmulationIsCustomDevice = SHAFT.Properties.web.mobileEmulationIsCustomDevice();
String mobileEmulationDeviceName = SHAFT.Properties.web.mobileEmulationDeviceName();
int mobileEmulationWidth = SHAFT.Properties.web.mobileEmulationWidth();
int mobileEmulationHeight = SHAFT.Properties.web.mobileEmulationHeight();
double mobileEmulationPixelRatio = SHAFT.Properties.web.mobileEmulationPixelRatio();
String mobileEmulationUserAgent = SHAFT.Properties.web.mobileEmulationUserAgent();
String baseURL = SHAFT.Properties.web.baseURL();
int browserWindowWidth = SHAFT.Properties.web.browserWindowWidth();
int browserWindowHeight = SHAFT.Properties.web.browserWindowHeight();

/** set **/
SHAFT.Properties.web.set().targetBrowserName(Browser.CHROME.browserName())
.headlessExecution(false)
.forceBrowserDownload(false)
.incognitoMode(false)
.isMobileEmulation(false)
.mobileEmulationIsCustomDevice(false)
.mobileEmulationDeviceName("")
.mobileEmulationWidth(360)
.mobileEmulationHeight(640)
.mobileEmulationPixelRatio(1.0)
.mobileEmulationUserAgent("")
.baseURL("")
.browserWindowWidth(1920)
.browserWindowHeight(1080);

Mobile

  • These properties control web and/or native mobile GUI test automation settings, like target platform version, path to the app under test, and the activity name that you want to start testing.
import com.shaft.driver.SHAFT;
import org.openqa.selenium.Platform;
import io.appium.java_client.remote.AutomationName;

/** get **/
String platformName = SHAFT.Properties.mobile.platformName();
String platformVersion = SHAFT.Properties.mobile.platformVersion();
String deviceName = SHAFT.Properties.mobile.deviceName();
String automationName = SHAFT.Properties.mobile.automationName();
String udid = SHAFT.Properties.mobile.udid();
String browserName = SHAFT.Properties.mobile.browserName();
String browserVersion = SHAFT.Properties.mobile.browserVersion();
String app = SHAFT.Properties.mobile.app();
String appPackage = SHAFT.Properties.mobile.appPackage();
String appActivity = SHAFT.Properties.mobile.appActivity();

/** set **/
SHAFT.Properties.platform.set().targetPlatform(Platform.ANDROID.name());
SHAFT.Properties.mobile.set().platformVersion("13.0")
.deviceName("Google Pixel 7")
.automationName(AutomationName.ANDROID_UIAUTOMATOR2)
.udid("")
.browserName("")
.browserVersion("")
.app("src/test/resources/testDataFiles/apps/ApiDemos-debug.apk")
.appPackage("")
.appActivity("");

API

This section lists all configurable properties related to Swagger/OpenAPI contract validation for SHAFT API testing.

import com.shaft.driver.SHAFT;

/** get **/
boolean swaggerValidationEnabled = SHAFT.Properties.api.swaggerValidationEnabled();
String swaggerValidationUrl = SHAFT.Properties.api.swaggerValidationUrl();

/** set **/
SHAFT.Properties.api.set()
.swaggerValidationEnabled(true)
.swaggerValidationUrl("https://petstore.swagger.io/v2/swagger.json");

Flags

  • These properties control generic platform flags, like the number of test retry attempts, auto-maximization of web browser window, and any other built-in checks or workarounds that aim to stabilize your test execution.
import com.shaft.driver.SHAFT;

/** get **/
var clickUsingJavascriptWhenWebDriverClickFails = SHAFT.Properties.flags.clickUsingJavascriptWhenWebDriverClickFails();

/** set **/
SHAFT.Properties.flags.set().clickUsingJavascriptWhenWebDriverClickFails(true);

Reporting

  • These properties control the engine's built-in reporting capabilities, such as whether or not to capture the element name in the report to make it more readable, capturing WebDriver logs for debugging, and the behavior of reports before and after test execution.
import com.shaft.driver.SHAFT;

/** get **/
var captureElementName = SHAFT.Properties.reporting.captureElementName();

/** set **/
SHAFT.Properties.reporting.set().captureElementName(false);

Allure

  • These properties control the engine's built-in Allure reporting capabilities, such as when to open the report, whether to accumulate history and reports, and how to customize the report appearance.
  • Since version 8.3.20240827, the Allure properties have been renamed and extended. The old property names are listed in the table below for reference.
import com.shaft.driver.SHAFT;

/** get **/
boolean automaticallyOpen = SHAFT.Properties.allure.automaticallyOpen();
boolean accumulateHistory = SHAFT.Properties.allure.accumulateHistory();
boolean accumulateReports = SHAFT.Properties.allure.accumulateReports();
boolean cleanResultsDirectory = SHAFT.Properties.allure.cleanResultsDirectory();
boolean generateArchive = SHAFT.Properties.allure.generateArchive();
String customLogo = SHAFT.Properties.allure.customLogo();
String customTitle = SHAFT.Properties.allure.customTitle();

/** set **/
SHAFT.Properties.allure.set()
.automaticallyOpen(true)
.accumulateHistory(true)
.accumulateReports(true)
.cleanResultsDirectory(true)
.generateArchive(false)
.customLogo("https://example.com/logo.png")
.customTitle("My Test Suite Report");

Timeouts

  • These properties control the engine's built-in synchronization capabilities, such as waiting for lazy loading, element identification timeout, API connection timeout, database query timeout, and shell session timeout.
import com.shaft.driver.SHAFT;

/** get **/
var elementIdentificationTimeout = SHAFT.Properties.timeouts.defaultElementIdentificationTimeout();

/** set **/
SHAFT.Properties.timeouts.set().defaultElementIdentificationTimeout(5);

Visuals

  • These properties control the engine's built-in visual validation and AI capabilities, such as the visual matching threshold for AI powered element identification, when to take screenshots, screenshot types, videos, animated GIFs, and complete page snapshots.
import com.shaft.driver.SHAFT;

/** get **/
var visualMatchingThreshold = SHAFT.Properties.visuals.visualMatchingThreshold();

/** set **/
SHAFT.Properties.visuals.set().visualMatchingThreshold(0.7);

Jira

  • These properties control the engine's built-in Jira and Xray integrations for test management and defect reporting.
import com.shaft.driver.SHAFT;

/** get **/
var reportBugs = SHAFT.Properties.jira.reportBugs();

/** set **/
SHAFT.Properties.jira.set().reportBugs(true);

Cucumber

  • These properties control your cucumber settings, such as the path to your feature files, the package names for your step definition classes, and any plugins you want to enable.
  • You can only configure these properties by editing your src/main/resources/properties/cucumber.properties file.
(N/A)

Healenium

(Work In Progress)

Paths

(Work In Progress)

Pattern

(Work In Progress)

Tinkey

(Work In Progress)

BrowserStack

  • These properties control SHAFT's built-in integration with BrowserStack.
  • You can find all supported Web-based (Desktop or Mobile) execution properties & values in BrowserStack's Web Capability Generator
  • You can find all supported Native Mobile App execution properties & values in BrowserStack's Appium Capability Generator
(Work In Progress)

LambdaTest

(Work In Progress)

Performance

(Work In Progress)

TestNG

  • These properties control your TestNG parallelization settings.
  • You can only configure these properties by editing your src/main/resources/properties/testng.properties file.
(N/A)

Log4j

  • These properties control your Log4j2 logging settings.
  • You can only configure these properties by editing your src/main/resources/properties/Log4j2.properties file.
(N/A)