Fully documented
|
Award Winning
|
Selenium Ecosystem
|
|
[^4]: Company names are collected via anonymous surveys and provided freely by engineers who claimed to be using SHAFT_Engine within these companies.
Linux | macOS | Windows | Android | iOS | |
---|---|---|---|---|---|
Google Chrome | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Microsoft Edge | :white_check_mark: | :white_check_mark: | :white_check_mark: | _ | _ |
Mozilla Firefox | :white_check_mark: | :white_check_mark: | :white_check_mark: | _ | _ |
Apple Safari | _ | :white_check_mark: | _ | _ | :white_check_mark: |
Android | iOS | Windows | |
---|---|---|---|
Native | :white_check_mark: | :white_check_mark: | N/A |
Hybrid | :white_check_mark: | :white_check_mark: | N/A |
Flutter | :white_check_mark: | :white_check_mark: | N/A |
WPF | N/A | N/A | :white_check_mark: |
API | Database | CLI | JSON | YAML | Excel | Property | |
---|---|---|---|---|---|---|---|
:white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
TestNG | JUnit5 | Cucumber |
---|---|---|
:white_check_mark: | :white_check_mark: | :white_check_mark: |
Fluent design | Locator builder | Native WebDriver access |
Element/Browser validations builder | AI-powered visual validations |
---|---|---|---|---|
:white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Auto synchronization | Logging | Reporting | Screenshots/Attachments | Video recording |
---|---|---|---|---|
:white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
CI/CD integration | Cloud device farm integration | Headless testing | Parallel execution | Containerized execution |
---|---|---|---|---|
:white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
(Recommended for new local sandbox projects)
(Recommended for new source controlled projects)
(Recommended if you're upgrading an existing project from Native Selenium WebDriver to SHAFT)
<project>
tag.TestPackage
under src/test/java
and create a new Java Class TestClass
under that package.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;
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(); }
#### Step 3: Managing Test Data
- Create the following file ```src/test/resources/testDataFiles/simpleJSON.json```.
- Copy the below code snippet into your newly created json file.
```json
{
"searchQuery": "SHAFT_Engine"
}
TestClass.java
as a TestNG Test Class.src\main\resources\properties
and allow SHAFT to regenerate the defaults by running any test method.
[^1]: 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:
--plugin com.shaft.listeners.CucumberFeatureListener