Locate an element which have same name and same atrributes in selenium

Automation using selenium is a great experience. It provides many way to identif an object or element on the web page.
But sometime we face the problems of idenfying the objects on a page which have same attributes. When we get more than
one element which are same in attribute and name like multiple check boxes with same name and same id. More than one button having
same name and ids. There are no way to distingues those element. In this
case we have problem to instruct selenium to identify a perticular
object on a web page.
I am giving you a simple example . In the below HTML source there are 6 check boxes are there having same type and same name.
It is really tough to select third or fifth.

Thare are some function we can use in Xpath to identify the abject in above cases.
An XPath expression can return one of four basic XPath data types:

Click on first linkselenium.click("xpath=(//a[@name='a1'])[position()=1]");selenium.waitForPageToLoad("80000");Click on second linkselenium.click("xpath=(//a[@name='a1'])[position()=2]");selenium.waitForPageToLoad("80000");Click on last linkselenium.click("xpath=(//a[@name='a1'])[last()]");selenium.waitForPageToLoad("80000");Click on thrid linkselenium.click("xpath=(//a[@name='a1'])[position()=3]");selenium.waitForPageToLoad("80000");

How to Write in iFrame in selenium

When you write any mail in gmail you can see the body is a iframe we can write in it using

This is very informative blog and nice article , I really like your technique of writing a blog. More screenshots gives the clear representation.. I book marked it to my bookmark site list and will be checking back in the near future Selenium Training in Chennai gives you the entire stuff about all the Selenium Components. Among that, the above mentioned IDE is the baby steps to learn other 2 components.

A nice article here with some useful tips for beginners. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them. Here are some more link which I also useful for freshers. Free Selenium Tutorials |

I have read your blog and i got a very useful and knowledgeable information from your blog.You have done a great job . If anyone want Java Training in Chennai, Please visit our page Java Training in Chennai

Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well. Selenium Training in Chennai