Giter VIP home page Giter VIP logo

mujeeburrahk / regexautomationkit Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 17 KB

The RegexAutomationKit Framework is a toolset for efficient test automation, managing API interactions, database operations, DOM manipulations, and Appium server controls. It's designed to be extended by child projects, standardising test automation practices across applications.

Java 100.00%
appium dom-manipulation enumeration restassured-framework sql

regexautomationkit's Introduction

Project Overview:

This project provides a structured approach to managing API interactions, database operations, DOM manipulations, and Appium server management through various packages.

com.api

Purpose:

Manages API interactions including sending requests, parsing responses, and handling request configurations.

Key Classes and Usage

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()

com.database

Purpose:

Handles database interactions, including establishing connections, executing queries, and processing results.

Key Classes and Usage

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")

com.dom

Purpose:

Manages WebDriver instances, handles web elements, and performs various interactions in automated testing.

Key Classes and Usage

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)    

com.enums

Purpose:

Defines various enums used for states, platforms, locator types, query types, and request types.

Key Enums

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

com.utils

Purpose:

Provides utility methods for managing the lifecycle of an Appium server.

Key Class and Usage

* AppiumUtils:
    * Start the server: AppiumUtils.startServer()
    * Stop the server: AppiumUtils.stopServer()
    * Check server status: AppiumUtils.isServerRunning(port)

Integration Guide

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.

Step 1: Add Child Projects to this parent project pom.xml

<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>

Step 2: Configure Child Projects to use the parent project

<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>

Step 3: Import Packages in your Child Project

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"), "[email protected]", false);
Interactions.enterText(parseLocatorObject(LocatorPlatform.WEB, "PasswordField"), "123", false);
Interactions.click(parseLocatorObject(LocatorPlatform.WEB, "SubmitButton"));
DriverManager.quitDriverInstance(LocatorPlatform.WEB);

regexautomationkit's People

Contributors

mujeeburrahk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.