Simple Login (MonkeyTalk)
MonkeyTalk form:-
Input username EnterText
test
Input password EnterText
test
Button LOGIN tap
%thinktime=3000
Button LOGOUT tap
%thinktime=3000
Input username tap
Input username EnterText
test1
Input password EnterText
test1
Button LOGIN tap
%thinktime=3000
Button LOGOUT tap
%thinktime=3000
Input username tap
Input username EnterText
test2
Input password EnterText
test
Button LOGIN tap
%thinktime=3000
Button LOGOUT tap
%thinktime=3000
Javascript form:-
load("libs/<monkey_project_name>.js");
<monkey_project_name>.
<script_name>.prototype.run = function() {
this.app.input("username").enterText("test");
this.app.input("password").enterText("test");
this.app.button("LOGIN").tap({thinktime:"3000"});
this.app.button("LOGOUT").tap({thinktime:"3000"});
this.app.input("username").tap();
this.app.input("username").enterText("test1");
this.app.input("password").enterText("test1");
this.app.button("LOGIN").tap({thinktime:"3000"});
this.app.button("LOGOUT").tap({thinktime:"3000"});
this.app.input("username").tap();
this.app.input("username").enterText("test2");
this.app.input("password").enterText("test");
this.app.button("LOGIN").tap({thinktime:"3000"});
this.app.button("LOGOUT").tap({thinktime:"3000"});
};
Related Links:-
Related Links:-
- Eclipse configuration with Android SDK (Click here..)
- MonkeyTalk: Installation of Agent (Click here..)
- Writing script in MonkeyTalk (Click here..)
- Datadriven Script (Click here..)
- Passing variable values through driver script (Click here..)
- Conditional statements ( Click Here )
- Steps to install Android Apps to SD Card (Click here..)
- Steps to install Android App in Emulator ( Click Here )
No comments:
Post a Comment