Student Mode Code Display

Welcome to the Fraternity!

Commenting has been enabled. You can comment on all the Code Items now.

Descriptive Programming

Add This Code to My Favourite List
Enter Email

Contributed By IT Prof
Date 2016-03-20 00:48:38

'Tutorial: itprof_tut
'Using OR
Browser("IT Professional Academy").Page("IT Professional Academy").WebEdit("element_1").Set "Akash"

'Using Inline Description
Browser("title:=IT Professional Academy Automation Practice Form").Page("title:=IT Professional Academy Automation Practice Form").WebEdit("name:=element_1","type:=text").Set "Akash"

'Inline Descriptive Programming with regular Expression
Browser("name:=.*IT.*").Page("title:=.*IT.*").WebEdit("name:=element_1").Set "Nishad"

'Partial Inline Description
Browser("IT Professional Academy").Page("IT Professional Academy").WebEdit("name:=element_1","type:=text").Set "Akash"

'Dynamic Descriptive Programming
SystemUtil.Run "iexplore.exe",""

'Creating Description Object
Set oDesc_Name = Description.Create
oDesc_Name("micClass").value = "WebEdit"
oDesc_Name("name").value = "element_1"

'Using Child Objects method to get Child Object from the Form
Set oObj_Name = Browser("title:=.*IT.*").Page("title:=.*IT.*").ChildObjects(oDesc_Name)
msgbox oObj_Name.Count
oObj_Name(0).Set "Akash"
oObj_Name(6).Set "Ak"

'Using Description to Set Objects of Same Properties
Set oDesc_Name = Description.Create
oDesc_Name("micClass").value = "WebEdit"
Set oObj_Name = Browser("name:=.*IT.*").Page("title:=.*IT.*").ChildObjects(oDesc_Name)
For i=0 to oObj_Name.Count-1
	oObj_Name(i).Set i+1


'Using SetToProperty to Set Objects of Same Properties with out using Description
'Add Object in the Repository. Change object property 'index at run time.
For i=0 to 12
	Browser("Multiple Object with same").Page("Multiple Object with same").WebEdit("element").SetTOProperty "Index",i
	Browser("Multiple Object with same").Page("Multiple Object with same").WebEdit("element").Set i

Download Above Code


Add your comments...
Name : *      
Email : *      
The content of this field will be kept private and will not be shown publicly

Your Comment/Answer *

Enter the text present in this box : *