Giter Site home page Giter Site logo

selebot's Introduction

SeleBot

#NOTE : Version is Unsable as Updating Internal Structure

Selebot is the selenium TestNG framework with the various build in functionality and seleniumUtility.It's designed with the vision of rapidly selenium script generation.

Prerequest :

1. Java
2. Maven

How to start :

  1. Download the repo
  2. Maven will automatically download all the dependency

File Structure:

    .
   
    └── src                                   
    ├── resources                              # Resource files and general configuration files
    │   ├── general.json                       # General configuration
    │   └── ObjectRepo                         # Json files with the locator details
    │       └── login.json
    └── test
    └── java
    ├── config                                 # configuration and seleniumUtility
    │   ├── General
    │   │   ├── ExcelFileConfig.java           # Excel file realated seleniumUtility
    │   │   ├── JsonFileConfig.java            # JSON file realated seleniumUtility
    │   │   ├── Methods.java                   # Selenium and General operation method
    │   │   ├── PerformAction.java             # Selenium actions
    │   │   └── Verify.java                    # Assertation
    │   └── SeleniumConfig                     # Selenium Configuration
    │       ├── AbstractPage.java
    │       └── BrowserConfig.java             # Browser configuration
    └── tests                                  # Test
    ├── LoginModule                            # Module   
    │   └── tests.java                         # TesNG Test Methods
    │   ├── Steps.java                         # Steps logic
    │   └── Verify.java                        # Assertation

Start to create Test cases :

1. Add all the locators in Json file under ObjectRepo directory

For e.g

For login screen, create login.json

Add locator details in following format

"Element name": {
    "locatorType" : "",
    "locatorValue" :  "",
    "default" : "",
    "textType" : "",
    "auto" : boolean
  },

Property Description
Element name variable name
locatorType any type of locator that is supported by selenium like xpath,classname,tagname,name etc.
locatorValue value of the locator
auto : true Enter data automatically in textfield based on the textType
textType type of data, want to entered into text fields
default enter this data when auto mode is false

Last three properties are used for entering text into textfields

For example

"password": {
    "locatorType" : "xpath",
    "locatorValue" :  ".//input[@id='authPassword']",
    "default" : "123456",
    "textType" : "password",
    "auto" : false
  },

2. Create the module directory like LoginModule under tests directory

3. Create test class

Add TestNG Test and steps

performAction.click("Json file Name", "locator name");
 @Test
 public void Login() {
    
   performAction.click("login", "loginbutton");

   performAction.sendKeys(currentFileName, "email");
   
   performAction.pause(3);
 }

selebot's People

Contributors

aenkymistry avatar roshanmistry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

soumyaqa reddync

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.