1) What is test automation?
Test automation is the process of making use of software like selenium to automate the execution of tests, perform outcome comparison with expected outcome.
2) What is test automation framework?
Test automation in simple words is the automation of testing processes. Automation framework is a system built with needed components to perform this process. When it comes to test automation it is a framework that determines, controls the automation of a specific product. Automation framework is a system built on set of rules targeted towards testing a specific product
3) What is the advantage of test automation framework?
Automation is coded. This code can be reused for automating many test cases
Little manual work is needed once testing is automated
Testing cost reduction
One time development of code and framework can be reused multiple times
4) What are the testing types supported by selenium?
5) When is xpath used with selenium webdriver?
For traversing and finding elements within a document xpath is used. Elements that can’t be found using locators like id, class, name etc in a webpage can be easily located using xpath which is a syntax used for addressing into a document
6) What are the types of xpath?
Xpath falls into one of the following categories:
Absolute xpath – xpath single forward slash is used to locate the document root as per xpath expression. It is a direct way to find an element in a webage. If a change is made in the lement path the xpath will fail
Relative xpath – This starts with double forward slashes. This is used to search for the element anywhere within the document. This is common xpath expression widely used
7) What can be tested using selesense commands?
Selesense commands are selenium commands used for web application testing. A tester can make use of the selesense commands to perform the following:
Check broken links
Check for existence of UI objects
Ajax functionality testing
list option testing
8) What are all the types of selesense commands?
Commands give direction to selenium automation engine on what needs to be done. Selesense commands fall into one of the following categories:
9) What are the components of selenium toolsuite?
Selenium tool suite is composed of multiple software tools.Detailed information and description of each and every software in tool suite is as follows :
Selenium IDE :
Selenium IDE, Integrated Development Environment is used for building test scripts. It is well integrated with web browsers and is a prototype tool.
It is based on simple concept of record and play back.
It is nothing but a firefox plugin that is well integrated with web browser, has a handy user interface and used for developing automated tests.
Record and playback is simple record of steps that a user performs. These actions are stored as reusable scripts. These scripts are portable across many different
10) What is pip?
To install packages related to python pip utility can be made use of
11) How do you install a package with pip in python environment?
pip install [packagename]
12) How do you install selenium web driver using pip?
pip the utility used to install packages in a python environment will help us install selenium webdriver using simple syntax
pip install selenium
13) What is a selenium locator?
A selenium locator is an address that identifies the web element uniquely in a webpage. There are many different locators in selenium as follows:
XPath – standard navigation tool for xml
CSS Selector – this can be tag and id, tag and class, tag and attribute, tag class and attribute, inner text
DOM – The document object model is standard for navigation through html element tree
14) Can you explain about Selenium?
Selenium is an open source software testing framework used for automating web UI applications.
15) What are the different components that Selenium supports?
• Selenium Integrated Development Environment (IDE)
• Selenium Client API
• Selenium Remote Control
• Selenium WebDriver
• Selenium Grid
16) What are the main advantages of using Selenium?
• Is an open source reliable/robust browser based automation tool for automating web UI applications
• Scalable across environments
• Easily portable in different browser environment by using the appropriate browser driver
• Can be built in different languages based on what language the company is using
• Automated tests can be distributed across different machines for parallel execution of tests
17) What is the main disadvantage of using Selenium?
• Selenium supports web based application and does not provide support for windows based applications
• Requires a high technical expertise to build robust automation tests using selenium web driver
• Requires third party framework tools for report generation, object identification etc
18) What browsers are supported in Selenium?
• Internet Explorer
• Google Chrome
19) What operating systems does Selenium support?
• Apple OS
20) What languages does Selenium support?
• Objective C
21) Can Selenium be used to test web services?
Yes, selenium can be used to test web services using SOAP UI. We use Groovy script to integrate Selenium with SOAP UI
22) Using selenium web driver list the different ways that you locate elements?
To locate web elements we use findElement (or) findElements method.
The different ways to locate a web element is as follows:
23) What is XPath?
XPath is a way of identifying elements in a web page. The syntax for XPath is:
// : Select current node.
Tagname: Tagname of the particular node.
@: Select attribute.
Attribute: Attribute name of the node.
Value: Value of the attribute.
24) What are the different flavors of XPath?
• Absolute XPath
• Relative XPath
How do you launch different browsers in selenium web driver?
By instantiating the appropriate browser driver and the using the handle to do different things in that browser (Ex: Load a URL, finding elements in the web page etc)
25) How do you clear a text from textbox?
By using clear() method on a web element.
If a textbox has been instantiated before and the testBox contains values, then use, textBox.clear() to clear the values in the test box.
26) What is the difference between close and quit command?
The quit command will kill the driver, driver server and all associated browser windows whereas the close command only closes the current browser windows
The close command only closes the browser window the driver has focus on.
27) What is implicit wait in Selenium?
Implicit wait time are common to all web elements and has a global timeout associated with it.
28) How do you refresh browser in selenium?
You cam refresh a browser using refresh command. This is called from the driver instance of a browser (Ex: driver.navigate().refresh()
29) How can cookies be deleted in Selenium?
Cookies can be deleted by selenium as follows:
• deleteCookie(Cookie cookie)
• deleteCookieNamed(String name)
30) What is an explicit wait in Selenium?
Explicit wait times are used if we need to delay the wait time of a particular web element.
31) How can we check if an element is displayed in a webpage?
By using isDisplayed() method.
Ex: Webelement textBox is a Text Box. If we need to know if the textBox is displayed then we use textBox.isDisplayed() to verify if the textBox is displayed.
32) How can we check if an element is enabled in a webpage?
By using isEnabled() method
Explain about isSelected()method
This method is to check if a particular web element on a webpage is selected currently
33) What selenium command will you make use of to get all the links present on the page?
Make use of the command MyList mylinks=d.findElements(By.xpath(“//a”));
While making use of findElements many different locators can be used like id,name,classname,tagname,linktext,partial link text, xpath etc