terminaldriver-tn5250j

terminal driver for 5250 telnet

License

License

Categories

Categories

MINA Net Networking
GroupId

GroupId

com.github.vebqa
ArtifactId

ArtifactId

terminaldriver-tn5250j
Last Version

Last Version

0.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

terminaldriver-tn5250j
terminal driver for 5250 telnet
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/terminaldriver/terminaldriver.git

Download terminaldriver-tn5250j

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.vebqa/terminaldriver-tn5250j/ -->
<dependency>
    <groupId>com.github.vebqa</groupId>
    <artifactId>terminaldriver-tn5250j</artifactId>
    <version>0.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.vebqa/terminaldriver-tn5250j/
implementation 'com.github.vebqa:terminaldriver-tn5250j:0.0.5'
// https://jarcasting.com/artifacts/com.github.vebqa/terminaldriver-tn5250j/
implementation ("com.github.vebqa:terminaldriver-tn5250j:0.0.5")
'com.github.vebqa:terminaldriver-tn5250j:jar:0.0.5'
<dependency org="com.github.vebqa" name="terminaldriver-tn5250j" rev="0.0.5">
  <artifact name="terminaldriver-tn5250j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.vebqa', module='terminaldriver-tn5250j', version='0.0.5')
)
libraryDependencies += "com.github.vebqa" % "terminaldriver-tn5250j" % "0.0.5"
[com.github.vebqa/terminaldriver-tn5250j "0.0.5"]

Dependencies

compile (6)

Group / Artifact Type Version
junit : junit jar 4.12
com.github.vebqa : tn5250j jar 0.7.6.4
org.apache.commons : commons-text jar 1.6
org.apache.velocity : velocity-engine-core jar 2.0
com.fasterxml.jackson.core : jackson-core jar 2.9.8
com.fasterxml.jackson.core : jackson-databind jar 2.9.8

Project Modules

There are no modules declared in this project.

terminaldriver

A screen driver for junit automation. Provides an implementation of TerminalDriver to control a 5250 session. Provides annotations to facilitate creation of 'Page Objects'.

To use with maven:

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
      <dependency>
	    <groupId>com.terminaldriver.tn5250j</groupId>
        <artifactId>terminaldriver-tn5250j</artifactId>
	    <version>0.0.1-SNAPSHOT</version>
      </dependency>
      <dependency>
	      <groupId>org.projectlombok</groupId>
    	  <artifactId>lombok</artifactId>
	      <version>1.16.8</version>
	      <scope>provided</scope>
      </dependency>    
  </dependencies>

Use lombok (optional) to reduce the amount of boiler plate.

Example Test code:

@Test
 public void testApp() throws Exception
{
 
    	TerminalDriver driver = new TerminalDriver();
    	driver.connectTo("server", 23);
    	driver.dumpScreen();

	Login login = ScreenObjectFactory.createPage(Login.class, driver);
	MainMenu mainmenu = login.login("JOHNDOE","mysecret");
}

Example Page Object:

@IdentifyBy(
   {	@FindBy(text=">> Welcome to the best known public AS/400| <<",row=1)	}
    )

@Data
public class Login {

    TerminalDriver driver;

    @FindBy
    ScreenField userid;

    @FindBy
    ScreenField password;

	@FindBy(row=3,attribute=ScreenAttribute.BLU)
    ScreenTextBlock systemName;

    public MainMenu login(final String userid, final String password){
	    this.userid.setString(userid);
	    this.password.setString(password);
	    driver.keys().enter();
	    driver.waitForScreen(5000);
	    try {
		    Thread.sleep(1000);
	    } catch (InterruptedException e) {
   }
 	  MainMenu mainMenu = new MainMenu();
  	 ScreenObjectFactory.initElements(mainMenu, driver);
	 return mainMenu;
	}
}

Versions

Version
0.0.5
0.0.4
0.0.3
0.0.2