All Downloads are FREE. Search and download functionalities are using the official Maven repository.

automated.test_manage.run.TestCaseRunner Maven / Gradle / Ivy

The newest version!
package automated.test_manage.run;

import automated.reporting.TestReporter;
import automated.test_manage.actions.Actions;
import automated.test_manage.config.ConfigMethods;

/**
 * Created by Ismail on 12/25/2017.
 * This class contains all generic actions (Mobile and Web)
 * And All config methods inherited from ConfigMethods
 * And contains custom Assertion and custom Reports actions
 */
public class TestCaseRunner extends ConfigMethods {

    /******************** Class Methods Section ********************/
    /***************** Config Methods Implementation *****************/

    /***************** Report Methods Implementation *****************/
    // This method to Add Test Case Description to report
    protected void testDescription(String testDescription) {
        TestReporter.testCaseDescription(testDescription);
    }

    /***************** Actions Implementation Section *****************/
    // This method to apply Send text to text fields action
    protected void sendText(String selector, String valueString) {
        Actions.sendText(selector, valueString);
    }

    // This method to apply Send text to text fields action
    // but from test data file not from user
    protected void sendText(String selector) {
        // Extract first value from test case dataRow
        String value = TestCaseFiles.getValueOfDataRow();
        // Send Selector and data value to sendText in Actions class
        Actions.sendText(selector, value);
    }

    // This method to apply Send Keyboard Keys to text fields action
    protected void sendKeys(String selector, CharSequence... keyboardKeys) {
        Actions.sendKeys(selector, keyboardKeys);
    }

    // This method to apply get Text from element action
    protected String getText(String selector) {
        return Actions.getText(selector);
    }

    // This method to apply Click buttons, Radios,
    // Checkboxes and any element accept click action
    protected void click(String selector) {
        Actions.click(selector);
    }

    //This method to apply Wait For time in seconds action
    protected void waitFor(int timeInSeconds) {
        Actions.waitFor(timeInSeconds);
    }

    // This method to apply wait until element be ready
    protected void waitUntil(String selector) {
        Actions.waitUntil(selector);
    }

    /*************** Test Files Implementation Section ***************/
    // This method to Set Test Locators File Path
    protected void setTestLocatorsFile(String fileName) {
        TestCaseFiles.setTestLocatorsFile(fileName);
    }

    /***************** Assertion Actions Section *****************/

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy