This project provides a structured approach to managing API interactions, database operations, DOM manipulations, and Appium server management through various packages.
Manages API interactions including sending requests, parsing responses, and handling request configurations.
APIClientManager:
* Set the base URI: APIClientManager.setBaseURI("http://example.com")
* Send a request: APIClientManager.sendRequest(requestModel, ResponseClass.class)
APIRequestModel:
* Create a request model: new APIRequestModel(RequestType.POST, "/endpoint", requestBody, headers)
APIResponseModel:
* Handle response data: responseModel.getStatusCode(), responseModel.getResponseBody()
Handles database interactions, including establishing connections, executing queries, and processing results.
DBClientManager:
* Set up a connection: DBClientManager.setConnection(dbUrl, user, password)
* Retrieve a connection: DBClientManager.getConnection()
* Close connection pool: DBClientManager.closeConnectionPool()
DBHandler:
* Execute a query: DBHandler.executeQuery(queryModel)
* Process results: DBHandler.handleSelectQueryResult(resultSet)
QueryModel:
* Create a query model: new QueryModel(QueryType.SELECT, "tableName")
* Set query parameters: queryModel.setWhereCondition("id=1")
Manages WebDriver instances, handles web elements, and performs various interactions in automated testing.
CacheManager:
* Cache an element: cacheManager.cacheElement("locatorName", webElement)
* Retrieve a cached element: cacheManager.getCachedElement("locatorName")
DriverManager:
* Initialize WebDriver: DriverManager.setWebDriver()
* Launch a URL: DriverManager.launchURL("http://example.com", true)
ElementHandler:
* Locate an element: elementHandler.getElement(locatorModel, ElementState.Visible)
Interactions:
* Interact with elements: interactions.click(locatorModel)
LocatorModel:
* Create a locator model: new LocatorModel(LocatorPlatform.WEB, "locatorName", "locatorType", "locatorValue")
WaitManager:
* Verify element state: waitManager.isElement(ElementState.Clickable, locatorModel)
Defines various enums used for states, platforms, locator types, query types, and request types.
ElementState:
Present, NotPresent, Visible, Invisible, Enabled, Disabled, Clickable
LocatorPlatform:
WEB, IOS, ANDROID
LocatorType:
XPATH, CSS, NAME, TAG, TEXT, CHAIN, PREDICATE, ACCESSIBILITY, ID
QueryType:
SELECT, INSERT, UPDATE, DELETE
RequestType:
GET, POST, PUT, DELETE
Provides utility methods for managing the lifecycle of an Appium server.
* AppiumUtils:
* Start the server: AppiumUtils.startServer()
* Stop the server: AppiumUtils.stopServer()
* Check server status: AppiumUtils.isServerRunning(port)
This guide explains how to link child projects with this 'RegexAutomationKit' project using Maven. Follow these steps to configure your pom.xml files and import the necessary packages.
<groupId>org.regexautokit</groupId>
<artifactId>RegexAutomateKit</artifactId>
<version>1.0.0</version>
<modules>
<module>child-project-1</module>
<module>child-project-2</module>
<!-- Add more child projects as needed -->
</modules>
<parent>
<groupId>org.regexautokit</groupId>
<artifactId>RegexAutomateKit</artifactId>
<version>1.0.0</version>
</parent>
<groupId>com.yourcompany.child</groupId>
<artifactId>child-project-1</artifactId>
<version>1.0.0</version>
DriverManager.setWebDriver();
DriverManager.setPageTimeOut(LocatorPlatform.WEB, 60);
DriverManager.launchURL("https://google.com", true);
Interactions.isElement(ElementState.Present, parseLocatorObject(LocatorPlatform.WEB, "LandingScreen"));
Interactions.isElement(ElementState.Present, parseLocatorObject(LocatorPlatform.WEB, "LoginTitle"), 10);
Interactions.enterText(parseLocatorObject(LocatorPlatform.WEB, "LoginField"), "user@gamil.com", false);
Interactions.enterText(parseLocatorObject(LocatorPlatform.WEB, "PasswordField"), "123", false);
Interactions.click(parseLocatorObject(LocatorPlatform.WEB, "SubmitButton"));
DriverManager.quitDriverInstance(LocatorPlatform.WEB);