Identifying HTML Elements with same name

In an HTML page, if there are three checkboxes and all are having same names internally and externally, then while recording how it would be distinguished?

Questions by darshanp

Showing Answers 1 - 4 of 4 Answers

InkThink

  • Jul 15th, 2009
 

We should add some other property(through object identification) which uniquely identifies each checkbox. If there are no other properties which uniquely identify the object and the number of items is fixed, I guess you can use "index".

Mansi

  • Aug 3rd, 2014
 

You can use child item method.

  Was this answer useful?  Yes

Anonimous

  • Jan 21st, 2015
 

In Selenium you can use the Xpath locator

  Was this answer useful?  Yes

There are different ways which can be applied to such cases like:-
1. Siblings identification where in you can put index, location, etc,
Best way is to inspect the element with firebug(plugin of Firefox) and then identify the same element with Selenium IDE(plugin and play-capture tool of Firefox browser) which will automatically provide you multiple locator option for same element

  Was this answer useful?  Yes

Komal

  • Jul 13th, 2017
 

In such cases mostly there will be index attribute that will associated with the checkbox. Recorder will record using that. Or they can also be identified using the parent table ID and then using column numbers

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions