Understand the HTML DOM Structure

 


Understand the HTML DOM Structure

    • DOM stands for Document object model.
    • Webpage is consist of multiple web elements.
    • webpages are written in HTML language.
    • These web elements present in the webpage are arranged in Document object model which is created by the bowser.
    • The DOM presents an HTML document as a tree structure as shown below.

    • We (Developer & QA) can perform multiple operations like 
        • Build Document
        • Navigate there structure
        • Add element
        • update element
        • remove element
    • Now these elements are basically combination of tags and attributes.

        • Few Examples of tags
          • Input
          • Div
          • Iframe
          • Anchor
          • html 
          • img
          • body

        • Few Examples of attributes
          • ID
          • Name
          • Type
          • classname
          • value


    • Now to locate an element in selenium we generally use tags and attributes.

    Post a Comment