Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop Testing Forum : Testing Tools @ OneStopTesting : QuickTest Pro @ OneStopTesting |
Topic: By giving the description in form of the string... |
|
Author | Message |
tanushree
Senior Member Joined: 04Apr2007 Online Status: Offline Posts: 2160 |
Topic: By giving the description in form of the string... Posted: 28Nov2007 at 4:45am |
By giving the description in form of the string arguments.
This is a more commonly used method for Descriptive Programming. You can describe an object directly in a statement by specifying property:=value pairs describing the object instead of specifying an object’s name. The general syntax is: TestObject("PropertyName1:=PropertyValue1", "..." , "PropertyNameX:=PropertyValueX") TestObject—the test object class could be WebEdit, WebRadioGroup etc…. PropertyName:=PropertyValue—the test object property and its value. Each property:=value pair should be separated by commas and quotation marks. Note that you can enter a variable name as the property value if you want to find an object based on property values you retrieve during a run session. Consider the HTML Code given below: <--!input type="”textbox”" name="”txt_Name”"--> <--!input type="”radio”" name="”txt_Name”"--> Now to refer to the textbox the statement would be as given below Browser(“Browser”).Page(“Page”).WebEdit(“Name:=txt_Name”,”html tag:=INPUT”).set “Test” And to refer to the radio button the statement would be as given below Browser(“Browser”).Page(“Page”).WebRadioGroup(“Name:=txt_Name”,”html tag:=INPUT”).set “Test” If we refer to them as a web element then we will have to distinguish between the 2 using the index property Browser(“Browser”).Page(“Page”).WebElement(“Name:=txt_Name”,”html tag:=INPUT”,”Index:=0”).set “Test” ‘ Refers to the textbox Browser(“Browser”).Page(“Page”).WebElement(“Name:=txt_Name”,”html tag:=INPUT”,”Index:=1”).set “Test” ‘ Refers to the radio button Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.