HTML : 01 - HTML for Selenium (Part 1) – What is HTML (Introduction)?

 

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.

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

HTML for Selenium - PageSource1

 

2)  Right click on any blank area on the web page and select ‘View Page Source’ from the displayed contextual menu.

HTML for Selenium - PageSource2

 

3) Observe that all the HTML code used for creating the page by its developer will be displayed as shown below:

HTML for Selenium -PageSource3

 

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

HTML for Selenium - LoginPage12) Right click on any UI element on the page say ‘Login’ button and select ‘Inspect’ option from the contextual menu

HTML for Selenium - LoginPage2

 

 

 

 

 

 

 

 

3) Observe that the HTML Source code specific to the selected UI element will be displayed as shown below:

HTML for Selenium - LoginPage3

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.

Comments

Popular posts from this blog

10 automation test cases for https://www.saucedemo.com/ (Sauce Demo)

Java Roadmap for SDET Superstars!

Mastering XPath in Selenium 4 🚀 – Supported Functions & Axes Explained