Selenium WebDriver Java Framework Course Limited Time Offer for $20

Selenium WebDriver Java Framework Course Limited Time Offer for $20

 

Print

Selenium Model View Controller Test Framework Part 4 - Main Script

MySimpleScript.java

package com.seleniummaster.qa.script;

import static org.junit.Assert.*;

import com.seleniummaster.qa.framework.ScriptBase;
import com.seleniummaster.qa.framework.controller.*;
import com.thoughtworks.selenium.*;

import static com.seleniummaster.qa.framework.AppConstant.*;

import org.junit.Test;

public class MySimpleScript extends ScriptBase {

    @Test
    public void Mytest1() {
        //run this test four times
        for(int i=1;i<5;i++)
        {
        CalculateMonthlyPaymentControl paymentCalculate1=new CalculateMonthlyPaymentControl(selenium);
        
        paymentCalculate1.calculatePayment(HOMEVALUE, CREDITPROFILE, DOWNPAYMENT, LOANPURPOSE, INTERESTRATE, LOANTERM, STARTMONTH, STARTYEAR, PROPERTYTAX, PMI);
        
        paymentCalculate1.captureScreen("c:\\finaltestnew"+i+".png");
        paymentCalculate1.calculateNow();
        paymentCalculate1.verifyResult("$2,254.80");
    }
    }


@Test
public void Mytest2() {
        
        CalculateMonthlyPaymentControl paymentCalculate2=new CalculateMonthlyPaymentControl(selenium);
        
        paymentCalculate2.calculatePayment(HOMEVALUE, CREDITPROFILE, DOWNPAYMENT, LOANPURPOSE, INTERESTRATE, LOANTERM, STARTMONTH, STARTYEAR, PROPERTYTAX, PMI);
        
        paymentCalculate2.captureScreen("c:\\finaltest2.png");
        paymentCalculate2.calculateNow();
        paymentCalculate2.verifyResult("$2,254.80");
    }