Thursday, July 19, 2018

CICS Screen Automation Frame Work

As400 Automation

Things Needed Before Start

  1. Java  Knowledge
  2. TestNG
Introduction To CICS Screen



Terminal Types

  1. TN5250
  2. TN3270

Architecture






Sample Code 

Login Function

public class Login extends FunctionBaseTN5250 {

    
    public static void loadBox(String stripAdress, String strbox) throws Exception {
        connectToBox(stripAdress, strbox);
        waitForScreenwithText("USER ID", 5);
    }

   
    public static void LoginToBox(String strUserName, String strPassword) throws Exception {

        sendText(strUserName, LoginPage.getRowNoUserNameField(), LoginPage.getColNoUserNameField());
        sendKeys(TAB);
        sendText(strPassword, LoginPage.getRowNoPasswordField(), LoginPage.getColNoPasswordField());
        sendKeys(ENTER);
    }

}


Login Page

public class T5250LoginPage {

private static int rowNumberUserNameField = 13;
private static int colNumberUserNameField = 41;

private static int rowNumberPasswordField = 14;
private static int colNumberPasswordField = 41;

}


Login Test

public class LoginTest  
{

    @BeforeClass    
    public void init(ITestContext iTestContext)
    {
    }
    @Test
    public static void PurchaseOrder() throws Exception{
         Login. loadBox(iPAddress, box);
         Login. LoginToBox(userName,password);
        

}


}

1 comment:

  1. Hi,I got a AS400 to automate, how to start with this ?
    im using a 5250 emulator , i tried with tn5250j but no luck.
    how to make the connection between emulator and selenium ? how to recognize elements ?
    Can you please help me with this

    ReplyDelete