JavaScript an object-oriented computer programming language commonly used to create interactive effects within web browsers. It is the language for HTML, for the Web, for computers, servers, laptops, tablets, smart phones, and more.
The HTML DOM (the Document Object Model) is the official W3C standard for accessing HTML elements. JavaScript can manipulate the DOM (change HTML contents). We are performing this by using the CSS selector. We can use certain keyword for finding the ID, CLASS, and NAME. Here are some examples.
getElementById (“ID_NAME”)
getElementByname (“NAME”)
getElementByclassName (“CLASS NAME”)
getElementByname (“NAME”)
getElementByclassName (“CLASS NAME”)
These selectors are used to select particular web element. Similarly selectors are available for finding element in the web.
getElementById (“ID_NAME”)
getElementByname (“NAME”)
getElementByclassName (“CLASS NAME”)
getElementByname (“NAME”)
getElementByclassName (“CLASS NAME”)
Am discussing this because some of the concepts are useful in developing automated test case with Selenium. There is much other option also, such as XPath.
XPath is used to identify an element uniquely; Sometimes the XPath is not reliable. Modifying the website cause changes in the XPath of the element.
XPath is used to identify an element uniquely; Sometimes the XPath is not reliable. Modifying the website cause changes in the XPath of the element.
No comments:
Post a Comment