Interview Questions Selenium & Appium: Fresher Academy
Interview Questions Selenium & Appium: Fresher Academy
Interview Questions Selenium & Appium: Fresher Academy
Fresher Academy
Selenium & Appium
1
Selenium Interview Questions
What is Automation Testing?
Selenium is a free open source testing tool. Some of the challenges with
selenium webdriver are as:
1. We cannot test windows application
2. We cannot test mobile apps
3. Limited reporting
4. Handling dynamic Elements
5. Handling page load
6. Handling captcha
3
Selenium Interview Questions
What type of tests have you automated
4
Selenium Interview Questions
Why do you prefer Selenium Automation Tool?
5
Selenium Interview Questions
What is Selenium?
Selenium là một bộ kiểm thử tự động (mã nguồn mở) miễn phí cho các ứng dụng web
trên các trình duyệt và nền tảng khác nhau. Selenium chỉ tập trung vào việc tự động hóa
các ứng dụng dựa trên web.
Selenium IDE (Browser Addon - Record and Playback của trình duyệt)
Selenium WebDriver
Selenium Grid (Kiểm thử phân tán)
Selenium hỗ trợ kịch bản bằng các ngôn ngữ như Java, C #, Python, Ruby, PHP, Perl,
Javascript.
6
Selenium Interview Questions
What is Selenium IDE?
7
Selenium Interview Questions
Which is the only browser that supports Selenium IDE to be used?
8
Selenium Interview Questions
What is Selenium Grid?
9
Selenium Interview Questions
When do you use Selenium Grid?
10
Selenium Interview Questions
What are the advantages of Selenium Grid?
It allows running test cases in parallel thereby saving test execution time.
It allows multi-browser testing
It allows us to execute test cases on multi-platform
11
Selenium Interview Questions
What are the types of WebDriver APIs available in Selenium?
• Firefox Driver
• Gecko Driver
• InternetExplorer Driver
• Chrome Driver
• HTML Driver
• Opera Driver
• Safari Driver
• Android Driver
• iPhone Driver
• EventFiringWebDriver
12
Selenium Interview Questions
What are the Programming Languages supported by Selenium
WebDiver?
• Java
• C#
• Python
• Ruby
• Perl
• PHP
13
Selenium Interview Questions
What are the Locators available in Selenium?
15
Selenium Interview Questions
What is the difference between “/” and “//”
Single Slash “/” – Single slash is used to create XPath with absolute path
i.e. the XPath would be created to start selection from the document
node/start node.
Double Slash “//” – Double slash is used to create XPath with relative path
i.e. the XPath would be created to start selection from anywhere within the
document.
16
Selenium Interview Questions
What is the difference between Absolute Path and Relative Path?
Absolute XPath starts from the root node and ends with desired descendant
element’s node. It starts with a single forward slash(/).
/html/body/div[3]/div[1]/form/table/tbody/tr[1]/td/input
Relative XPath starts from any node in between the HTML page to the
current element’s node(last node of the element). It starts with a double
forward slash(//).
//input[@id='email']
17
Selenium Interview Questions
How to launch a browser using Selenium WebDriver?
WebDriver is an Interface. We create an Object of a required driver class
such as FirefoxDriver, ChromeDriver, InternetExplorerDriver etc.,
18
Selenium Interview Questions
What are the types of waits available in Selenium WebDriver?
In Selenium we could see three types of waits such as Implicit Waits, Explicit
Waits and Fluent Waits.
• Implicit Waits
• Explicit Waits
• Fluent Waits
19
Selenium Interview Questions
What is Implicit Wait In Selenium WebDriver?
Implicit waits tell to the WebDriver to wait for a certain amount of time
before it throws an exception.
WebDriver will wait for the element based on the time we set. The default
setting is 0 (zero) and we need to setup the required time
20
Selenium Interview Questions
What is WebDriver Wait In Selenium WebDriver?
21
Selenium Interview Questions
What is Fluent Wait In Selenium WebDriver?
FluentWait can define the maximum amount of time to wait for a specific
condition and frequency with which to check the condition before throwing
an “ElementNotVisibleException” exception.
22
Selenium Interview Questions
How to get a text of a web element?
23
Selenium Interview Questions
What is the difference between driver.get() anddriver.navigate.to(“url”)?
driver.get(): To open an URL and it will wait till the whole page gets loaded
24
Selenium Interview Questions
Can I navigate back and forth in a browser in Selenium WebDriver?
26
Selenium Interview Questions
How can we maximize browser window in Selenium?
27
Selenium Interview Questions
How to delete cookies in Selenium?
28
Selenium Interview Questions
What is the difference between driver.getWindowHandle() and
driver.getWindowHandles() in Selenium WebDriver?
29
Selenium Interview Questions
What is the difference between driver.close() and driver.quit()
methods?
30
Selenium Interview Questions
What is the difference between driver.findElement() and
driver.findElements() commands?
31
Selenium Interview Questions
How can we handle web based pop-up?
To handle alerts popups we need to do switch to the alert window and call
Selenium WebDriver Alert API methods
32
Selenium Interview Questions
How to handle hidden elements in Selenium WebDriver?
33
Selenium Interview Questions
List some scenarios which we cannot automate using Selenium
WebDriver?
34
Selenium Interview Questions
What is Object Repository in Selenium WebDriver?
35
Selenium Interview Questions
How to switch between frames in Selenium?
36
Selenium Interview Questions
How To Perform Double Click Action In Selenium WebDriver?
37
Selenium Interview Questions
What is TestNG?
38
Selenium Interview Questions
What are the annotations available in TestNG?
@BeforeTest
@AfterTest
@BeforeClass
@AfterClass
@BeforeMethod
@AfterMethod
@BeforeSuite
@AfterSuite
@BeforeGroups
@AfterGroups
@Test 39
Selenium Interview Questions
What is TestNG Assert and list out some common Assertions
supported by TestNG?
40
Selenium Interview Questions
Explain how you can find broken images in a page using Selenium Web
driver ?
41
Selenium Interview Questions
Explain how you can handle colors in web driver?
42
Selenium Interview Questions
Using web driver how you can store a value which is text box?
43
Selenium Interview Questions
Explain how you can switch between frames?
44
Selenium Interview Questions
Mention 5 different exceptions you had in Selenium web driver?
WebDriverException
NoAlertPresentException
NoSuchWindowException
NoSuchElementException
TimeoutException
45
Selenium Interview Questions
Explain using Webdriver how you can perform double click ?
46
Selenium Interview Questions
What is the difference between getWindowhandles() and
getwindowhandle() ?
47
Selenium Interview Questions
Explain how you can switch back from a frame?
Syntax-driver.switchTo().defaultContent();
48
Selenium Interview Questions
How to select value in a dropdown?
selectByValue:
selectByValue.selectByValue(“greenvalue”);
selectByVisibleText:
selectByVisibleText.selectByVisibleText(“Lime”);
selectByIndex:
selectByIndex.selectByIndex(2);
49
Selenium Interview Questions
What are the different types of navigation commands?
navigate().back()
navigate().forward()
navigate().refresh()
navigate().to()
50
Selenium Interview Questions
How to click on a hyper link using linkText?
driver.findElement(By.linkText(“Google”)).click();
driver.findElement(By.partialLinkText(“Goo”)).click();
51
Selenium Interview Questions
How can we handle web-based pop-up?
52
Selenium Interview Questions
How to assert the title of the web page?
Or
assertEquals(expectedTitle, driver.getTitle());
53
Selenium Interview Questions
How to mouse hover on a web element using WebDriver?
54
Selenium Interview Questions
How to set test case priority in TestNG?
55
Selenium Interview Questions
What are the advantages of the Automation framework?
Reusability of code
More Test Coverage in less time
Reliability
Parallel execution of test cases
Fast
Minimal manual intervention
Easy Reporting
56
Selenium Interview Questions
How can I read test data from excels?
Test data can efficiently be read from excel using ApachePOI libraries API. It
support both xls and xlsx files.
57
Selenium Interview Questions
Can captcha be automated?
58
Appium Interview Questions
59
Appium Interview Questions
What is Appium?
60
Appium Interview Questions
What are Native Apps?
Native apps are those written using the iOS or Android SDKs.
61
Appium Interview Questions
What are Mobile Web Apps?
Mobile web apps are web apps accessed using a mobile browser.
62
Appium Interview Questions
What are Hybrid Apps?
Hybrid apps - combine both web applications created for web browser and
native applications that are designed for a particular platform. They have a
wrapper around a “webview” — a native control that enables interaction
with web content.
63
Appium Interview Questions
What are the pre-requisite to use APPIUM?
re-requisite to use APPIUM is
• ANDROID SDK
• Eclipse IDE
• JDK
• Selenium Server JAR
• Webdriver Language Binding Library
• TestNG
• APPIUM for Windows
• APK App Info On Google Play
64
Appium Interview Questions
How Would You Retrieve A DOM Element Or The XPath In A Mobile App?
You have the <UIAutomateviewer> or <Appium Inspector> tool to locate
any element for Android app.
65
Appium Interview Questions
What Are The Probable Errors You Might See While Working With Appium?
Answer.
66
Appium Interview Questions
What Language Does Appium Support?
Appium support any language that support HTTP request like Java,
JavaScript with Node.js, Python, Ruby, PHP, Perl, etc.
67
Appium Interview Questions
What Language Does Appium Support?
Appium support any language that support HTTP request like Java,
JavaScript with Node.js, Python, Ruby, PHP, Perl, etc.
68
Performance Test Interview Questions
69
Performance Test Interview Questions
What is Performance Testing?
70
Performance Test Interview Questions
What are the different types of Performance Testing?
Load testing – It checks the application’s ability to perform under anticipated user loads. The objective is
to identify performance bottlenecks before the software application goes live.
Stress testing – This involves testing an application under extreme workloads to see how it handles high
traffic or data processing. The objective is to identify the breaking point of an application.
Endurance testing – It is done to make sure the software can handle the expected load over a long period
of time.
Spike testing – This tests the software’s reaction to sudden large spikes in the load generated by users.
Volume testing – Under Volume Testing large no. of. Data is populated in a database and the overall
software system’s behavior is monitored.
Scalability testing – The objective of scalability testing is to determine the software application’s
effectiveness in scaling up to support an increase in user load.
71
Performance Test Interview Questions
What is throughput in Performance Testing?
72
Performance Test Interview Questions
What is concurrent user load in Performance Testing?
73
Performance Test Interview Questions
What is a Protocol? Name some Protocols.
HTTP
HTTPS
FTP
Web Services
Citrix
74
Performance Test Interview Questions
What are the types of Performance Tuning?
75
Performance Test Interview Questions
Explain what is JMeter?
76
Performance Test Interview Questions
Explain how JMeter works?
77
Performance Test Interview Questions
Explain what is Samplers and Thread groups?
Thread group: For any test plan, JMeter is the beginning part of thread
group elements. It is an important element of JMeter, where you can set a
number of users and time to load all the users given in the thread group
Pre-processor
Post processor
79
Performance Test Interview Questions
Explain what are Pre-processor Elements? List some of the pre-processor
elements?
PreProcessors are JMeter elements that are used to execute actions before the sampler
requests are executed in the test scenario.For example, fetching data from a database,
setting a timeout between sampler execution or before test data generation.
To configure the sample request prior to its execution or to update variables that are not
extracted from response text pre-processor elements are used.
Configuration elements
Pre-processors
Timers
Samplers
Post-processors
Assertions
Listeners
81
Performance Test Interview Questions
Explain what is Assertion in JMeter? What are the types of assertion?
Assertion helps to verify that your server under test returns the expected
results
Some commonly used Assertion in JMeter are
Response Assertion
Duration Assertion
Size Assertion
XML Assertion
HTML Assertion
82
Performance Test Interview Questions
List out few JMeter Listeners?
Spline Visualizer
Aggregate Report
View Result Tree
View Result in Table
Monitor Results
Distribution Graph
BeanShell Listener
Summary Report and so on
83
Performance Test Interview Questions
In JMeter is it necessary to call embedded resources explicitly?
You can eliminate all embedded resources from being explicitly called.
Requests have a checkbox at the bottom that says “retrieve embedded
resources.” It would grab all CSS, JPG, etc. It is a brilliant way to find
resources and broken link in a web App.
84
Performance Test Interview Questions
Explain what is the role of Timer in JMeter?
With the help of a timer, JMeter can delay the time between each request,
which a thread makes. It can solve the overload problem of the server.
85
Performance Test Interview Questions
Explain what is Post-processor?
86
Postman Interview Questions
87
Postman Interview Questions
What is Postman?
Postman is a rest client software which basically used for API testing with
different types of request method types like post, put etc and parameters,
headers and cookies.
Apart from setting the query parameters and checking the response,
postman also let us see different response stats like time, status, headers,
cookies...
88
Postman Interview Questions
What is a collection in Postman?
Postman Collections are a group of saved requests that can organize into
folders like folders in computer systems.
A collection is the grouping of requests, preferably of the similar types.
89
Postman Interview Questions
State any 5 types of Request Method types.
Get
Post
Put: update/replace all entire resource in the collection
Delete
Patch: modify the collection itself
90
Postman Interview Questions
Please define status code 401.
The HTTP 401 error status response code is referred for an unauthorized request . It
indicates that the request has not been applied because it lacks valid authentication
credentials for the target resource
91
Postman Interview Questions
What are different types by which we can see response body in Postman.
Pretty: The pretty mode formats JSON or XML responses so they are easier
to view
Raw: The raw view is a large text area with the response body. It can
indicate whether your response is minified.
Preview: The preview tab renders the response in a sandboxed iframe.
Some web frameworks by default return HTML errors and the preview
mode is especially helpful. JavaScript and images are disabled in the iframe
92
Postman Interview Questions
What is Pre-Request Script in Postman?
A pre request script is a script that runs before the execution of a request.
93
Postman Interview Questions
What are the two types of scripts in Postman?
There are two different types of scripts in POSTMAN.
One is the pre-scripts and the other is the test scripts.
On the other hand, the test script gets executed after the request is sent to the server
and the response is received
94
Postman Interview Questions
What is Page Object Model?
Page Object Model, also known as POM, is a design pattern in Selenium which is
commonly used in Selenium for Automating the Test Cases. This design pattern can be
used with any kind of framework like keyword-driven, Data-driven, hybrid framework,
etc.
In Page Object Model, consider each web page of an application as a class file.
The Page object is an object-oriented class which acts as an interface for the page of
your Application under test. Page class contains web elements and methods to interact
with web elements
95
Fresher Academy Happy Coding!
96