101⟩ Do you know what is a XPath?
XPath is a language that describes a way to locate and process items in Extensible Markup Language (XML) documents by using an addressing syntax based on a path through the document's logical structure or hierarchy.
“Automation related Frequently Asked Questions by expert members with professional career as Automation. These list of interview questions and answers will help you strengthen your technical skills, prepare for the new job interview and quickly revise your concepts”
XPath is a language that describes a way to locate and process items in Extensible Markup Language (XML) documents by using an addressing syntax based on a path through the document's logical structure or hierarchy.
There are some causes of Selenium WebDriver test to fail:
☛ SeleniumWebDriver element waiting to access did not appear on the web page and the operation timed out
☛ SeleniumWebDriver is trying to access not created element
☛ SeleniumWebDriver cannot locate the element, because the locator has been changed
JUnit is an open source Java applications testing framework, introduced by Apache. A process of adding a special form of syntactic metadata to Java source code is called annotation. JUnit Annotations are: variables, parameters, packages, methods and classes.
Selenium server could be run on java-jar selenium-server.jar-port other than its default port.
There are three ways of HTML test report creation:
☛ using inbuilt default.html to get the HTML report in TestNG
☛ with the ANT help in JUnit
☛ using XSL jar for converting XML content to HTML in own customized reports
Using CSS selector we can only move downwards in the document, using XPaths we traverse up in the document.
The Data Driven test design framework follows a design paradigm where test logic is fixed but varies the test data. The data itself can be in different repositories like a simple .csv file, .json file or .xls sheet, or database and can add the tests merely updating those external files or DB (instead of placing in test code itself).
If you need to close the current browser having focus driver.close() is used. If you need to close all the browser instances driver.quit() is used.