HTML for Selenium (Part 1) – What is HTML (Introduction)?
Basics of HTML are required for understanding the below upcoming topics in this Selenium Tutorial series:
- > Selenium IDE
- > Locators
We don’t have to learn the complete HTML for Selenium, instead we should only learn the HTML basics that are required for Selenium.
I am going to explain all the HTML basics that are required for Selenium in this tutorial series.
What is HTML?
HTML stands for Hyper Text Markup Language.
HTML is a language, who’s purpose is to create the Web Pages.
- > Example: www.tutorailsninja.com/demo
View the HTML Source code of the entire page:
To make you clear that HTML language is used to create web pages, I am going to show you the HTML Source code behind the creation of web pages.
Follow the below steps to view the HTML Source code of any page:
1) Open any web page say www.tutorailsninja.com/demo in any browser say Chrome
2) Right click on any blank area on the web page and select ‘View Page Source’ from the displayed contextual menu.
3) Observe that all the HTML code used for creating the page by its developer will be displayed as shown below:
View the HTML Source Code of a particular UI element on the page
Follow the below steps to view the HTML Source code of a particular UI element on the page:
1) Open any web page say http://tutorialsninja.com/demo/index.php?route=account/login in any browser say Chrome
2) Right click on any UI element on the page say ‘Login’ button and select ‘Inspect’ option from the contextual menu
3) Observe that the HTML Source code specific to the selected UI element will be displayed as shown below:
Understanding HTML basics for Selenium
As you have now understood what an HTML is and its role in creating Web Pages, I will explain more HTML concepts that are required for learning in the upcoming posts.
Watch this video on ‘What is HTML?’ for more clarity:
- > To learn more about Selenium, continue to the next post (Click on Next Post link below)
- > Check complete Selenium Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning ?
On a mission to contribute to the Software Testing Community in all possible ways.