selenium tutorial testing tools

Basic HTML concepts required for Selenium

What is HTML?

As you know HTML Hyper Text Markup Language used for describing web pages. Each tag represents a document content. HTML contains tags with angle brackets like and plain text. There are two tags one is start tag and second tag is end tag. Every tag should end with a forward slash before the tag name.

Syntax:

<tagname>content here</tagname>
<html>
<head></head>
<body>
<h1>My First H1 Heading</h1>
<p>My first paragraph content goes here</p>
</body>
</html> 

HTML tags determine to display the content to display on the web browser. The current version (At the time of writing) of HTML is version 5.
Now coming to our selenium, we generally see the below elements / attributes in any of the simple web page.

  • Text-box
  • Text-area
  • link
  • radio-buttons
  • check-box
  • drop-down / list-box
  • table, Etc....
  • We can divide the elements in three ways:
    1. Single Elements
    2. Group Elements
    3. Customized Elements

    For Single elements, we can easily find out an locator to work with selenium. We can locate by ID or by Link or by Link Text.


    single elements


    For Group elements, we should try to prefer name as identifier along with a combination of value or index property.


    group elements


    In the below screen shot, we can use name as "birthday_month" and value to select the particular month.

    Click here for sample HTML file with basic elements

Selenium Tutorials: 

Comments

good

Very helpful information

helping out to clear concepts

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.