Descriptive Code--1

Learn Descriptive coding------1


We can use this programming to recognized similar type of objects. in this code the properties of the objects is used in the script only. , no need to depend on the object repository.

Example:1—Login into Flight Application
Dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set "venkat"
Dialog("text:=Login").WinEdit("attached text:=Password:").Set "mercury"
Dialog("text:=Login").WinButton("text:=OK").Click

Example : 2--- Login into yahoo , click inbox , select a mail and delete
with Browser("CreationTime:=0").page("micclass:=Page")
    .WebEdit("name:=login").Set "venkat"
    .WebEdit("name:=passwd").Set "12345678"
    .webbutton("name:=Sign In").Click
    .link("text:=inbox\s\(\d*\)").Click
    .WebCheckbox("index:=2").Set "ON"
    .WebButton("name:=Delete","index:=0").Click
    .link("text:=Sign Out").Click
End with

Example : 3--- Display the List of links in Google home page
Dim d
Set d=Description.Create
d("micclass").value="Link"
set a=Browser("CreationTime:=0").page("micclass:=Page").ChildObjects(d)
For i=0 to a.count-1
  print a(i).getROProperty("innertext")
Next

Example : 4—Display the data from all the edit boxes in Flight application
Dim d
Set d=Description.Create
d("micclass").value="WinEdit"
Set a=Window("text:=Flight Reservation").ChildObjects(d)
For i=0 to a.count-1
  print a(i).getROproperty("attached text")&" "&a(i).getROProperty("text")
Next

Comments

  1. Hi,

    I had executed the script provided by you for the flight reservation. But still i am getting the error that "Object doesn't support this property or method: 'Dialog(...).WinEdit'".

    Line (2): "Dialog("Login").WinEdit("Name:=Agent Name:","attached text=Agent Name:").Set "surendra"".

    I hope so, you might have understood the problem.
    Please help me out in this how to run this program.
    email id: nbabu11@gmail.com

    ReplyDelete
  2. Hi Venkat sir,

    I was your student in MindQ Systems.This bolg is very useful to all learners.

    Thanks,
    Laya

    ReplyDelete
  3. sir,

    I would like to check all the links in any web site. Here my intention is to check any brokenlinks in that site. I created the script for check the links and brokenlinks in homepage of web site. but its taking much time to execute all the links. Now my requirement is need to check brokenlinks of any website and spell checking of entire website. Can you please reply for this it will be great and very useful to me.

    Note: Please script should be generic to any site..

    Thanks,
    Manthra Laya

    ReplyDelete

Post a Comment