The Problem Description is a bit lengthy, sorry for that.
When I click the button labeled new in the HTML page a set of 5 buttons namely (Edit, Copy, Order, Delete and Above) Will be created and displayed just below the new button.Now if I click on the delete button this set of 5 buttons(Edit, Copy, Order, Delete and Above) will be removed.If the new button is continuously clicked for 15 times then 15 * buttons will be created and displayed.Out of this there will be 15 delete buttons.
I need to ensure that there is no delete button in the screen before I start to run my other scripts.I am in need of a procedure to find out how many delete buttons are in the screen and click then one by one un till there is no delete button.
If anyone could help me regarding the same it would be of great use.
you'll have to use getMappableChildren on the parent object of those buttons. If they all have different parents, then you'll have to do this recursively. A search on "getMappablechildren" should reveal a couple of posts on how to do this.
Mr.Prasanna and Mr.Cyblue That's a good Idea but I have already tried those methods.It works but there is still a problem.
Suppose if there are 5 delete buttons and if I apply the method that you suggest the script successfully clicks on 1 or 2 sometime 3 buttons but it is not clicking all the delete buttons.
I have given enough time after clicking each delete button to leave the page to reload.
I once again thank you for your valid suggestions.