If you are working with IDE and recording your script. There may be some cases where you IDE can not record the action to the element that do not have any id. In such case you need to find the id manually and provide it to the script to cover your action. XPath help you here to navigate your site.
In one of my project when I was recording my script for create a post, I found that IDE is unable to record the text box activity. Actually that text box was Javascript content editor 'Tinymce' . Later I recognized that IDE is unable to find this editor as there was no label used for this. So I used X paths to locate the element ID. It looks like..
id('commentBodyField')
The XPath can be found using the Firefox plug-in. https://addons.mozilla.org/firefox/addon/1095
to find the XPath just right click over the desired element and click on view Xpath.
Software Testing, Test Automation, Test Consulting, and Trainings...... Learn from experience