Skip to main content

Properties List

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 set of 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 set of 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 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)
.isMobileEmulation(false)
.mobileEmulationIsCustomDevice(false)
.mobileEmulationDeviceName("")
.mobileEmulationWidth("")
.mobileEmulationHeight("")
.mobileEmulationPixelRatio("")
.mobileEmulationUserAgent("")
.baseURL("")
.browserWindowWidth(1920)
.browserWindowHeight(1080);

Mobile

  • These set of 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("");

Flags

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

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

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

Reporting

  • These set of properties control the engine's built-in reporting capabilities, like whether or not to capture the element name in the report to make it more readible, capturing webdriver logs for more debugging, and the behavior of our different 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);

Since version 8.3.20240827 Existing Allure Reporting Properties Have Changed to The Following And New Properties Added

Old Property Namenew Property NameDefault ValuePossible ValuesDescription
cleanAllureResultsDirectoryBeforeExecutionallure.accumulateHistoryfalsetrue, falsewhen false old results are deleted before the new run
generateAllureReportArchiveallure.generateArchivefalsetrue, falsegenerate Archive File .Zip for generated Allure report
openAllureReportAfterExecutionallure.automaticallyOpentruetrue, falseopen allure report after execution
NEWallure.accumulateReports'true'true, falseby default keeps old html allure reports and if false it will keep only last run report
NEWallure.customLogopath of SHAFT Logopath of your Customized logo on local machine or url if your logo is hosted onlinefor changing SHAFT logo To your customized logo on the report
NEWallure.customTitle"Test run report"any String valuefor changing Report Title from default value to any report title you want

Timeouts

  • These set of 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 set of properties control the engine's built-in visual validation and AI capabilities, such as the visual matching threshhold 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 set of 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 set of 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 set of 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 set of 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 set of properties control your Log4j2 logging settings.
  • You can only configure these properties by editing your src/main/resources/properties/Log4j2.properties file.
(N/A)