I am facing complication to automate an event page which has drop down with ID BUT drop down field's ID changes each time when I select different event. I've spoken to developer and she said these IDs are generated by Dot Net Random ID generator.
Can some one please help me with this and give some tips of how to automate random generated IDs.
Thank you [img]/images/graemlins/confused.gif[/img]
You need to find a property or nearby object that remains costant that can be used to help uniquely identify the control. There are numerous posts here that identify this problem but basically the easiest way is to use identify or a property check to see what you have to work with. If you can't find a constant property try a nearby object which will then allow you move to the desired control.
Problem is that all the properties changes according to ID change, for example, the 1st drop-down for event A' ID is "ctl00_event_ctl01" and elementID="1234" and if I access Event B page the 1st drop-down will be "ctl01_event_ctl003" and ElementID="2343", which mean i cannot have generic code to select values from drop down, it has to be static which i don't like to have.
the only solution i can think of to automate against one fix database but then if i want to run the script agaist other database it will fail and i need to change all the IDs, which is pain.