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.
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
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.
For Group elements, we should try to prefer name as identifier along with a combination of value or index property.
In the below screen shot, we can use name as "birthday_month" and value to select the particular month.
For Group elements, we should try to prefer name as identifier along with a combination of value or index property.
In the below screen shot, we can use name as "birthday_month" and value to select the particular month.
Comments
Post a Comment