Accenture – Selenium Interview Questions
Here is the list of Selenium Interview Questions which are recently asked in Accenture company. These questions are included for both Freshers and Experienced professionals. Our Selenium Training has Answered all the below Questions.
1. Can you brief about yourself.
Your answer should follow a simple, easy-to-follow format. We had recommend sticking to the tried-and-tested Past,Present,Future formula.
Meaning, structure you answer as follows:
The past - Tell Yourself like, what is your background and relevant work experience? How did you get to where you are now?
The present - what is your current role? What do you do and what are your top accomplishments?
The future - what are you looking to do next? Why are you interested in the position?
2. What is the difference between hashmap and hashtable?
1) HashMap is defined by non synchronized. It is not-thread safe and can't be shared between many threads without proper synchronization code. It is fast and traversed by Iterator.
2) Hashtable is synchronized. It is thread-safe and can be shared with many threads. Its slow and traversed by Enumerator and Iterator.
3. Difference between stringbuffer and string classes?
String Buffer | String Class |
---|---|
String buffer is Mutable class | String class is Immutable class |
All methods are synchronized in this class. | Methods are not synchronized |
It Consumes less memory. | It Consumes more memory. |
The length of the StringBuffer can be increased. | The length of the StringBuffer can be increased. |
String class overrides the equals() method of Object class. So you can compare the contents of two strings by equals() method. | StringBuffer class doesn't override the equals() method of Object class. |
4. What is testing?
Software testing is a process, to evaluate the functionality of a software application with an intent to find whether the developed software met the specified requirements or not and to identify the defects to ensure that the product is defect-free in order to produce a quality product.
Also the activities includes that ensure the identification of bugs/error/defects in a software.
5. What are different types of testing?
- Manual Testing
- Automation Testing
- Performance testing
- Acceptance testing
- Unit tests
- Integration tests
- Smoke testing
6. What are the types of testing you know apart from functional and performance testing?
- Performance Testing
- Load Testing
- Stress Testing
- Volume Testing
- Security Testing
- Compatibility Testing
- Install Testing
- Recovery Testing
- Reliability Testing
- Usability Testing
- Compliance Testing
- Localization Testing
7. What is security testing?
Security Testing is a type of Software Testing that uncovers vulnerabilities, threats, risks in a software application and prevents malicious attacks from intruders.
The purpose of Security Tests is to identify all possible loopholes and weaknesses of the software system which might result in a loss of information, revenue, repute at the hands of the employees or outsiders of the Organization
8. Where would you see yourself in the next 2 years?
First of all, a truthful answer about what you HOPE to be doing can easily sabotage your odds of landing a job offer. So what should you say?- Keep your answer fairly general
- Stress your interest in a long-term career
- Demonstrate your enthusiasm
9. What is compatability testing.?
Checking the functionality of an application on different software, hardware platforms, network, and browsers is known as compatibility testing.
Once the application is stable, we moved it to the production, it may be used or accessed by multiple users on the different platforms, and they may face some compatibility issues, to avoid these issues, we do one round of compatibility testing.
10. What is code coverage?
Code coverage is a metric that can help you understand how much of your source is tested. It's a very useful metric that can help you assess the quality of your test suite, and we will see here how you can get started with your projects.
Code coverage tools will use one or more criteria to determine how your code was exercised or not during the execution of your test suite.
11. Why are you looking for change?
The best way to answer the interview question, “Why are you looking for a job change?” is to focus on positive reasons that are easy to explain. Giving negative responses such as a nagging boss or work pressure should be avoided at any cost. Willingness to develop new skills- Need to relocate
- Plan to learn, grow and explore new opportunities
- Desire to get more new responsibilities and job role
12. What are your achievements in your project?
Interview questions that require you to brag about yourself aren’t easy, but you need to be ready to sound confident and show off what you’ve done. This isn’t the time to be humble.The way of your Answer is:
- Your work ethic: Interviewers are interested in what you view as an “accomplishment” and the proven work you completed to achieve it.
- Your core values: Interviewers are interested in which accomplishment you select as your “greatest” and why.
- Examples of your work: Interviewers want to learn about specific examples of your work. These examples give them an idea of projects you have completed and what they can expect from you.
13. What are the challenges you had in your project?
Questions about dealing with challenges are asked for all types of jobs and all different levels. It is therefore important that you prepare your answers in advance so that you’re able to demonstrate how you deal with challenges and describe what you learned from them.The interviewer wants answers to questions such as:
- What is your approach to dealing with challenges?
- How do your skills help you successfully finish projects?
- What is your work ethic like?
- How do you handle stress?
14. How would rate yourself in java out of 5.
The best way to answer such question is first analyze yourself how much knowledge you have for that particular skill because you know yourself well. Then rate yourself accordingly and also be prepared to justify or to explain the reason for your rating.
15. What is garbage collector in java?
In Java the Garbage collection consumes CPU resources for deciding which memory to free. Various garbage collectors have been developed over time to reduce the application pauses that occur during garbage collection.
At the same time to improve on the performance hit associated with garbage collection.
16. How do you achieve multiple inheritance in java?
Object Oriented Programming provides a user the feature of multiple inheritance, wherein a class can inherit the properties of more than a single parent class. In simpler terms, multiple inheritance means a class extending more than one class.The programming language of java is unable to utilise this feature directly. It can be achieved indirectly through the usage of interfaces.
17. What is the difference between interface and abstract class?
Type of methods: Interface can have only abstract methods. An abstract class can have abstract and non-abstract methods. From Java 8, it can have default and static methods also.
Final Variables: Variables declared in a Java interface are by default final. An abstract class may contain non-final variables.
Type of variables: Abstract class can have final, non-final, static and non-static variables. The interface has only static and final variables.
Implementation: Abstract class can provide the implementation of the interface. Interface can’t provide the implementation of an abstract class.
Inheritance vs Abstraction: A Java interface can be implemented using the keyword “implements” and an abstract class can be extended using the keyword “extends”.
18. My application is dynamic in nature including objects
The dynamic nature of computer graphics makes it a particularly interesting area of study. Research and implementation of rendering methods respond to changes in the underlying hardware.
For example, in the field of interactive rendering, the emerging programmable nature of the graphics accelerator has changed the relative costs of different techniques
19. Write a program to find the prime number.
int main(){
int n,i,m=0,flag=0;
printf("Enter the number to check prime:");
scanf("%d",&n);
m=n/2;
for(i=2;i<=m;i++)
{
if(n%i==0)
{
printf("Number is not prime");
flag=1;
break;
}
}
if(flag==0)
printf("Number is prime");
return 0;
}
20. Some questions of reasoning, probability.
Probabilistic reasoning is a way of knowledge representation where we apply the concept of probability to indicate the uncertainty in knowledge. In probabilistic reasoning, we combine probability theory with logic to handle the uncertainty.
21. How do you update your knowledge?
- Consider Taking Professional Development Courses
- Make Use of Online Resources
- Keep an Eye Out for Professional Events
- Take Your Networking Online
- Invest in Continuing Education and Certification
22. What is STLC?
Software Testing Life Cycle (STLC) is described as a succession of tasks conducted to execute Software Testing.
In contrast to popular belief, QA Software Testing Services is not a one-time task. It is made up of a collection of actions completed methodologically to assist revaluate your software product.
23. Can you tell me the output of each component in STLC.
23. Can you tell me the output of each component in STLC.
1.Requirement Phase Testing
OutPut:
RTM
Automation feasibility report. (if applicabl)
2.Test Planning in STLC
OutPut
Test plan /strategy document.
Effort estimation document.
3.Test Case Development Phase
Output:
Test cases/scripts
Test data
4. Test Environment Setup
Output:
Environment ready with test data set up
Smoke Test Results.
5. Test Execution Phase
OutPut:
Completed RTM with the execution status
Test cases updated with results
Defect reports
24. Have you done anything innovative in the past 3 years for which you felt very happy?
Some skills and qualities that go hand-in-hand with innovation are:- the confidence to take on big, ambitious goals and take risks
- the ability to adapt and be resourceful in unexpected situations
- the motivation to identify where things can be improved and then act on it
- the enthusiasm to try new things and gain new skills
- a creative approach to problem solving the ability to think imaginatively, but also strategically and practically (after all, it doesn’t matter how creative an idea
- is if it isn’t realistic commercially)
- the ability to work independently without much input from others as well as to work with a team towards a shared goal
25. What tools you use in QA automation?
Here listed the types of QA automation tools, you can tell according to your project tool for the interview- Telerik Test Studio. Selenium.
- Robotium.
- TestComplete.
- Watir.
- Visual Studio Test Professional.
- QTP (UFT)
- SoapUI.
26. What is selenium?
Selenium is an open-source tool that automates web browsers. It provides a single interface that lets you write test scripts in programming languages like Ruby, Java, NodeJS, PHP, Perl, Python, and C#, among others.
Most importantly, A browser-driver then executes these scripts on a browser-instance on your device (more on this in a moment).
Free PDF : Get our updated Selenium Course Content pdf
27. Explain about your selenium framework.
Selenium Framework is a suite of automation testing tools that is based on the JavaScript framework. It could run the tests directly on the target browser, drive the interactions on the required web page and rerun them without any manual input
28. What is the repositry you have used for objects in framework?
An Object Repository is a map between UI element and its locator. Which can also be written as an Object Map between UI element and the way to find it. In Selenium WebDriver’s context it means a Mapping between WebElement and the corresponding locator type and value. Lets understand it in more details by looking at a typical WebDriver code which finds an element
29. Can you write a sample webdriver script for login functionality of gmail.
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
print('Enter the gmailid and password')
gmailId, passWord = map(str, input().split())
try:
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get(r'https://accounts.google.com/signin/v2/identifier?continue='+\
'https%3A%2F%2Fmail.google.com%2Fmail%2F&service=mail&sacu=1&rip=1'+\
'&flowName=GlifWebSignIn&flowEntry = ServiceLogin')
driver.implicitly_wait(15)
loginBox = driver.find_element_by_xpath('//*[@id ="identifierId"]')
loginBox.send_keys(gmailId)
nextButton = driver.find_elements_by_xpath('//*[@id ="identifierNext"]')
nextButton[0].click()
passWordBox = driver.find_element_by_xpath(
'//*[@id ="password"]/div[1]/div / div[1]/input')
passWordBox.send_keys(passWord)
nextButton = driver.find_elements_by_xpath('//*[@id ="passwordNext"]')
nextButton[0].click()
print('Login Successful...!!')
except:
print('Login Failed')
30. What are the different annotations in Testing?
- @BeforeSuite
- @AfterSuite
- @BeforeTest
- @AfterTest
- @BeforeClass
- @AfterClass
- @BeforeMethod
- @AfterMethod
- @BeforeGroups
- @AfterGroups
31. What is the use of @BeforeTest annotation?
A method with @beforeTest annotation will run before any test method belonging to the classes inside the test tag is run. In a testing framework like smoke testing, @BeforeTest can be used to create initial set of data, and @AfterTest can be used to clean up the data, once all the tests are run.
32. How do you access the methods in TestNG class file along with parameters?
- Define parameters in the testng.xml file.
- Refer those parameters in source files using @Parameters annotation.
- @Parameters annotation’s attribute value will hold the list of variables used to fill the parameters of this method
- Note that value is an optional attribute so you can skip it and straightaway specify the list of parameters
33. I have a package which has 10 class files, would like to run first 6 class files in parallel and rest 4 in sequential how do you that?
34. Write the structure of TestNG xml file for the above scenario with parallel value as “tests” and “classes”.
35. How do you do parameterization in testing?
If your application involves inputting different types of user interactions, then Parameterization is the way to go. We can parameterize our automation scripts as per the framework being used for example Parameterization in TestNG framework for Selenium automation testing.
We can consider using excel files to fetch data sets and subsequently use it in our automation scripts but as we enhance our automation suite, it becomes necessary to use more robust test automation frameworks like TestNG to cover a wide category of tests in a more powerful manner.
36. How is dataprovider different from passing parameters from testng xml file?
Similar to TestNG Parameters, DataProviders are a means to pass data to test scripts in TestNG. Using DataProvider in TestNG, we can easily inject multiple values into the same test case. It comes inbuilt in TestNG and is popularly used in data-driven frameworks.
The syntax for a DataProvider in TestNG is as follows:
Java
@DataProvider(name = ”name of the data provider”)
public Object[][] dataProviderfunc(){
Return new Object[][]{
values
}
}
37. How do you handle dependency tests cases in testing?
Often, we want to run our test cases in a particular order in TestNG. We may use the priority parameter for that, no doubt, but priority will run all the cases without looking for the relationship we want to define (alphabetically for the same priority). The dependent tests in TestNG determine the dependency of a test on a single or group of tests.In this case, we say that a test is dependent on another test. It is similar to saying a browser is dependent on the internet. No internet means no purpose in running the browser. Providing dependencies among tests also helps us in the scenarios where we want to share the state or data between the methods.
. Write codes for the following:
38. Check if the given string is palindrome or not.
/* C program to check if the given string is a palindrome or not */
#include
#include
int main()
{
char a[100], b[100];
printf(“Enter the string : “);
gets(a);
strcpy(b, a); /* Copying input string */
strrev(b); /* Reversing the string */
if (strcmp(a, b) == 0) /* Comparing input string with the reverse string */
printf(“The string is a palindrome\n”);
else
printf(“The string is not t a palindrome\n”);
return 0;
}
39. Check if the given integer is palindrome or not.
Check if the given integer is palindrome or not.
Java program to check whether a number
// is Palindrome or not.
class GFG
{
/* Iterative function to reverse digits of num*/
static int reverseDigits(int num)
{
int rev_num = 0;
while (num > 0) {
rev_num = rev_num * 10 + num % 10;
num = num / 10;
}
return rev_num;
}
/* Function to check if n is Palindrome*/
static int isPalindrome(int n)
{
// get the reverse of n
int rev_n = reverseDigits(n);
// Check if rev_n and n are same or not.
if (rev_n == n)
return 1;
else
return 0;
}
/*Driver program to test reversDigits*/
public static void main(String []args)
{
int n = 4562;
System.out.println("Is" + n + "a Palindrome number? -> " +
(isPalindrome(n) == 1 ? "true" : "false"));
n = 2002;
System.out.println("Is" + n + "a Palindrome number? -> " +
(isPalindrome(n) == 1 ? "true" : "false"));
}
}
40. Write a sample code for hashmap and hashtable.
HashMap:
// Java program to illustrate
// Java.util.HashMap
import java.util.HashMap;
public class GFG {
public static void main(String[] args)
{
// Create an empty hash map
HashMap map = new HashMap<>();
// Add elements to the map
map.put("Anu", 10);
map.put("sachin", 30);
map.put("Asok", 20);
// Print size and content
System.out.println("Size of map is:- "
+ map.size());
System.out.println(map);
// Check if a key is present and if
// present, print value
if (map.containsKey("Anu")) {
Integer a = map.get("Anu");
System.out.println("value for key"
+ " \"Anu\" is:- " + a);
}
}
}
Output
Size of map is:- 3
{Asok=20, Anu=10, sachin=30}
value for key "vishal" is:- 10
Hashtable:
import java.util.Hashtable;
import java.util.Enumeration;
public class HashtableExample {
public static void main(String[] args) {
Enumeration names;
String key;
// Creating a Hashtable
Hashtable hashtable =
new Hashtable();
// Adding Key and Value pairs to Hashtable
hashtable.put("Key1","Mathi");
hashtable.put("Key2","Ajeet");
hashtable.put("Key3","sarah");
hashtable.put("Key4","Mithun");
hashtable.put("Key5","Mona");
names = hashtable.keys();
while(names.hasMoreElements()) {
key = (String) names.nextElement();
System.out.println("Key: " +key+ " & Value: " +
hashtable.get(key));
}
}
}
Key: Key4 & Value: Mithun
Key: Key3 & Value: Sarah
Key: Key2 & Value: Ajeet
Key: Key1 & Value: Mathi
Key: Key5 & Value: Mona
Write a sample code for threads
43. Given an array int a[] = int a{1,2,2,3,4,4,5,5,6,7}
44. Check if the given string is palindrome or not.
45. Check if the given integer is palindrome or not.
Book a Free Mock Interviews and Test your Selenium skills with our Experts
TOP MNC's SELENIUM INTERVIEW QUESTIONS & ANSWERS
Here we listed all Selenium Interview Questions and Answers which are asked in Top MNCs. Periodically we update this page with recently asked Questions, please do visit our page often and be updated in Selenium.
Related Blogs
To become a Selenium Certified professional and join in your dream company, Enroll now for our Best Selenium Training. We help you to crack any levels of Selenium Interviews and We offering Selenium Training with Placement Assistance.