Student Mode Code Display

Welcome to the Fraternity!

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

Descriptive Programming Basics Code


Add This Code to My Favourite List
Enter Email

Contributed By IT Prof
Date 2016-03-13 02:35:18

'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
'URL:"http://www.itprofessionalacademy.in/demo_site/demo_form/index.html"
SystemUtil.Run "iexplore.exe","http://www.itprofessionalacademy.in/demo_site/demo_form/index.html"

'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("name:=.*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
'URL: http://itprofessionalacademy.in/demo_site/multiple_text_box/index.html
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

Next

'Using SetToProperty to Set Objects of Same Properties with out using Description
'Add Object in the Repository. Change object property 'index at run time.
'URL: http://itprofessionalacademy.in/demo_site/multiple_text_box/index.html
For i=0 to 12
	Browser("IT Professional Academy").Page("IT Professional Academy").WebEdit("element").SetTOProperty "Index",i
	Browser("IT Professional Academy").Page("IT Professional Academy").WebEdit("element").Set i
Next

Download Above Code

Comments:



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 : *