Skip to main content

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 too.it 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

Comments

Popular posts from this blog

creating first go program

for creating go program open your editor and paste this code, and save it as filename.go for example helloworld.go

package main import "fmt" func main() { fmt.Println("Hello, 世界") }
I will explain these codes in details for now , we will look how to run these code.

to run type go run helloworld.go  in terminal , we get


you can try golang online as well , golang