Fully documented
|
Award Winning
|
Selenium Ecosystem
|
|
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β
Trusted solution of choice for: 1
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β
π User Guide:
- Check out our comprehensive and friendly user guide to learn why SHAFT should be your solution of choice if you're aiming for successful test automation.
- SHAFT is a unified test automation engine for web, mobile, API, CLI, database, and desktop e2e testing. Powered by best-in-class frameworks, SHAFT provides a wizard-like syntax to drive your automation efficiently, maximize your ROI, and minimize your learning curve with no limitations! Stop reinventing the wheel! Upgrade now!
Linux | macOS | Windows | Android | iOS | |
---|---|---|---|---|---|
Google Chrome | β | β | β | β | β |
Microsoft Edge | β | β | β | _ | _ |
Mozilla Firefox | β | β | β | _ | _ |
Apple Safari | _ | β | _ | _ | β |
Android | iOS | Windows | |
---|---|---|---|
Native | β | β | N/A |
Hybrid | β | β | N/A |
Flutter | β | β | N/A |
WPF | N/A | N/A | β |
API | Database | CLI | JSON | YAML | Excel | Property | |
---|---|---|---|---|---|---|---|
β | β | β | β | β | β | β | β |
- SHAFT also provides a lot of out-of-the-box convenience features to facilitate your testing process:
TestNG | JUnit5 | Cucumber |
---|---|---|
β | β | β |
Fluent design | Locator builder | Native WebDriver access |
Element/Browser validations builder | AI-powered visual validations |
---|---|---|---|---|
β | β | β | β | β |
Auto synchronization | Logging | Reporting | Screenshots/Attachments | Video recording |
---|---|---|---|---|
β | β | β | β | β |
CI/CD integration | Cloud device farm integration | Headless testing | Parallel execution | Containerized execution |
---|---|---|---|---|
β | β | β | β | β |
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
Β Β Β Β Β Β
- Join us via Slack & Facebook
- And feel free to create PRs directly. This lovely tutorial will help.
(Recommended for new local sandbox projects)
- The easiest and most straightforward way to create a new project that uses SHAFT.
- Just follow the simple steps here to generate your new project with one command (all configurations included).
(Recommended for new source controlled projects)
- Use our Template Project to create a new project with one click.
- Follow the steps in the ReadMe to handle project configuration.
(Recommended if you're upgrading an existing project from Native Selenium WebDriver to SHAFT)
- Create a new Java/Maven project using Eclipse, IntelliJ or your favourite IDE.
- Copy the highlighted contents of
this pom.xml file into yours
inside the
<project>
tag. - Follow the steps in this footnote in case you are using IntelliJ2.
- Create a new Package
TestPackage
undersrc/test/java
and create a new Java ClassTestClass
under that package. - Copy the below imports into your newly created java class.
import com.shaft.driver.SHAFT;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
- Copy the below code snippet into your newly created java class.
SHAFT.GUI.WebDriver driver;
SHAFT.TestData.JSON testData;
By searchBox = By.name("q");
By resultStats = By.id("result-stats");
@Test
public void test() {
driver.browser().navigateToURL("https://www.google.com/");
driver.verifyThat().browser().title().isEqualTo("Google").perform();
driver.element().type(searchBox, testData.getTestData("searchQuery"))
.keyPress(searchBox, Keys.ENTER);
driver.assertThat().element(resultStats).text().doesNotEqual("")
.withCustomReportMessage("Check that result stats is not empty").perform();
}
@BeforeClass
public void beforeClass() {
driver = new SHAFT.GUI.WebDriver();
testData = new SHAFT.TestData.JSON("simpleJSON.json");
}
@AfterClass(alwaysRun = true)
public void afterClass(){
driver.quit();
}
- Create the following file
src/test/resources/testDataFiles/simpleJSON.json
. - Copy the below code snippet into your newly created json file.
{
"searchQuery": "SHAFT_Engine"
}
- Run your
TestClass.java
as a TestNG Test Class. - The execution report will open automatically in your default web browser after the test run is completed.
- Join our to get notified by email when a new release is pushed out.
- After upgrading your Engine to a new major release it is sometimes recommended to delete the properties
folder
src\main\resources\properties
and allow SHAFT to regenerate the defaults by running any test method.
Footnotes
-
Company names are collected via anonymous surveys and provided freely by engineers who claimed to be using SHAFT_Engine within these companies. β©
-
If you're using Cucumber due to a known issue with IntelliJ you need to edit your run configuration template before running your tests by following these steps:
- Open 'Edit Run/Debug Configurations' dialog > Edit Configurations... > Edit configuration templates...
- Select Cucumber Java > Program Arguments > and add this argument:--plugin com.shaft.listeners.CucumberFeatureListener
- After saving the changes, remember to delete any old runs you may have triggered by mistake before adding the needed config. β©