Sunday, September 16, 2012

Train availability status automated by sikuli tool



Scenario :
View train availability between two station in live website.


Feature in script:

                      This script is used for password encryption when you enter in input box and tool tip used to highlight some area for user attraction then inside find region used to click particular area.

Example :
Below, code line is give to understand for above feature.

# Password encription
import javax.swing.JOptionPane as JOP
import javax.swing.JPasswordField as JPF
pwdF = JPF()

IN = input("Enter a user name")
type("Username-2.png", IN)
JOP.showConfirmDialog(None, pwdF,
        "Please enter Password",
        JOP.OK_CANCEL_OPTION)
passwd = pwdF.getText()
type("Password-2.png", passwd + Key.ENTER)
click("1347731963166.png"),

# Inside find

Er = find("12631NELLAIE.png").inside().find("1347731427595.png").right(38)
click(Er)

# Tooltip and highlight
from guide import *
text("TrainDetails.png", "Train Details")
show(2)
m = find("TrainName-1.png")
m.highlight(2)
tooltip("NELLAIEXPRES.png","NELLAI EXPRESS")
show(5)


Demo view in Video :


Youtube links :http://www.youtube.com/watch?v=8ZyE_-rGI6s&feature=plcp


Note : I have given above video for easy to understand and this is taken When the script run on sikuli IDE

No comments:

Post a Comment