Hi Guys,
I am using selenium RC with Visual Studio 2010 IDE and created tests.
Also i am using Selenium RC with Eclipse...
Here i am listed out some ideas in identifying dynamic objects.
Take your Object id looks like "ctl00_MainEntry_AreaCreationControl_AreaGridView_ctl12_AreaNameFooterTextBox"
Here ctl12 is the part which is changing part based on which row / session...But you want to enter the value irrespective of row position..
Here you have to use regular expressions
I am using selenium RC with Visual Studio 2010 IDE and created tests.
Also i am using Selenium RC with Eclipse...
Here i am listed out some ideas in identifying dynamic objects.
Take your Object id looks like "ctl00_MainEntry_AreaCreationControl_AreaGridView_ctl12_AreaNameFooterTextBox"
Here ctl12 is the part which is changing part based on which row / session...But you want to enter the value irrespective of row position..
Here you have to use regular expressions
- //input[Contains(@id,'ctl00_MainEntry_AreaCreationControl_AreaGridView_ctl') and Contains(@id,'_AreaNameFooterTextBox')]
- //input[@id,RegExp:'ctl00_MainEntry_AreaCreationControl_AreaGridView_ctl??_AreaNameFooterTextBox']
- //input[@id,glob:'ctl00_MainEntry_AreaCreationControl_AreaGridView_ctl*_AreaNameFooterTextBox']
- //*@id,glob:'ctl00_MainEntry_AreaCreationControl_AreaGridView_ctl*_AreaNameFooterTextBox']
If all the above methods are not working for you, then try these...
- //input[contains(@name,concat("starttext","_","middle","_")) and contains(@name,"endtext")]
- css=input[id$='starttext'] --- this means starts-with
- css=input[id^='endtext'] --- this means ends-with
- input[starts-with(@id='starttext')] --- this means starts-with
- input[ends-with(@id='endtext')] --- this means ends-with
Hope any one of the above solution will work....
வாழ்க வளமுடன்....
Comments
Post a Comment