How automation frameworks works

As i said in the previous post , Every web automation tools helps you to identify the web-element and make a action on it . If you are familiar with javascript Dom Method it would be more easier to understand . In Js there are libraries for locating elements and make a event the specific elements for example

document.getElementById("demo").innerHTML = "Hello World!";

This is Js code for identifying an element whose id is "demo" and we are inserting an text "Hello world" . This id could be the id of a <p> tag or h1 tag etc . We can make an action on this element by various way like onClick(),onLoad(),onHover() etc. you can use TagName or className for identifying elements too in Js .

In order to understand this you need to understand HTML DOM .HTML GUI is a representation of html code in browser . So HTML is not a programming language but some kind of representation of code for the GUI Part.
Another kind of representation is the HTML DOM. Hierarchy of elements attached to each other is represents as parent node and child node.This can be draw as a tree structure. <HTML> tags comes the top element or parent of all elements and all other's are called child node.

Just like HTML dom element representation we can  represent HTML in XML has also similar structure as like html . xml is also a representation of parent ans child nodes both HTML and XML represents in DOM  .

Selenium see web page as xml representation , so it can easily parse the nodes.
selenium has libraries which are in different languages who can talk with the browser libraries who drives the browser elements .

you can see how selenium works, Selenium

No comments:

Post a Comment


selenium javascript alert box

This is a easy task to capture javascript based alertbox , /* * To change this license header, choose License Headers in Project Properti...