Testleaf

Selenium Accenture Interview Questions

selenium accenture interview questions

Q1 :Tell me about yourself Explanation?

This question gives you the chance to present a brief professional summary of your experience and expertise. It’s important to highlight your skills relevant to the job and the type of work you have done. Keep it concise but impactful, focusing on your technical skills, key achievements, and your passion for the work. 

Scenario: “I am a Test Automation Engineer with X years of experience specializing in both UI and API testing. I have worked on projects where I automated complex web applications using Selenium WebDriver, Java, and TestNG. I developed a robust data-driven automation framework that integrated seamlessly with Jenkins for continuous testing. In addition to automation, I’m also skilled in reviewing code, collaborating with development teams, and providing efficient solutions to reduce manual testing effort. My goal is to improve software quality through efficient and scalable test automation strategies.” 

Explain your project Explanation:  

This question assesses your ability to communicate the technical aspects of a project. You should focus on the project’s objectives, your role, the tools and frameworks used, and any challenges overcome during the project. Use the STAR (Situation, Task, Action, Result) method for clarity. 

Scenario: “In my recent project, I worked on automating the test cases for an e-commerce application. The project aimed to reduce regression testing time and improve test coverage. I implemented a data-driven framework using Selenium WebDriver and TestNG for both functional UI testing and API validation. The framework was integrated with Jenkins for continuous integration, allowing us to run tests automatically after every deployment. As a result, we were able to cut down the regression testing cycle by 40%, which increased release efficiency and stability.” 

Q2: Framework that you’ve used in your project. Explain?  

Explanation 

A test automation framework is a set of guidelines or rules used to automate the testing process. It should be robust, reusable, and scalable. The interviewer wants to understand the structure and components of the framework you’ve worked with. Mention the framework type, tools used, and why it was effective. 

Scenario:  

“In my project, I used a hybrid framework that combined the Page Object Model (POM) and Data-Driven Testing approach. The POM helped to maintain the UI interaction logic separate from test scripts, ensuring reusability and easier maintenance. We used TestNG for test execution, Apache POI for handling test data from Excel, and Maven for dependency management. This framework was integrated with Jenkins for CI/CD pipelines, which allowed us to automatically run tests after each code commit, reducing the need for manual testing and increasing efficiency.” 

Q3: Difference between single slash and double slash in XPath? Explanation?

 In XPath: 

Single Slash (/):  

Used for absolute paths, starting from the root node and traversing step-by-step down the document. It’s rigid, and if any part of the path changes, the XPath may break.  

Double Slash (//):  

Used for relative paths, which can start from any node and search the entire document. This is more flexible and doesn’t depend on the absolute structure of the document. 

 Scenario:  

In my project, we used double slash XPath more often because it was more flexible, especially when handling dynamic or changing web pages.  

For example, to locate a search input element, I used:  

driver.findElement(By.xpath(“//input[@id=’searchBox’]”));  

This XPath would locate the element regardless of its position in the DOM, making it less brittle than an absolute XPath. 

Here is the detailed guide for Selenium Xpath.

Q4: Give Syntax to move to an element at the bottom of the page Explanation:?

 To scroll to the bottom of a page, Selenium doesn’t have a direct command. However, we can use JavaScript Executor to achieve this. This is especially useful when testing pages with infinite scrolling or lazy-loaded content. 

Code: 

JavascriptExecutor js = (JavascriptExecutor) driver;  

js.executeScript(“window.scrollTo(0, document.body.scrollHeight); 

“);  

Why: This ensures that the page scrolls to the bottom, making it possible to interact with elements that aren’t initially visible in the viewport. 

Scenario:  

For instance, during the automation of an e-commerce website with infinite scroll, we had to continuously load new product listings. I used this method to scroll down to the bottom of the page, which triggered new items to load dynamically. 

Q5: Write XPath to enter text in the given search box Explanation?

XPath can be used to locate elements on the page, and once identified, we can use sendKeys() to enter text into an input field. 

Code: 

driver.findElement(By.xpath(“//input[@id=’search’]”)).sendKeys(“Laptop”); 

 This XPath finds an input field with the id=”search“, and the sendKeys() method enters the text “Laptop” into -that field. 

Scenario:  

In my project, I automated a search functionality where the user could enter keywords to search for products. I used the above XPath to interact with the search box and automate the input of search terms. 

Q6: How to scroll to an element in a page that is asynchronously loading?  

Explanation: For pages that load elements asynchronously (such as infinite scroll pages), the elements might not be visible immediately. In this case, scrolling to the element requires a solution that can handle dynamic content. We use JavaScript Executor to scroll the element into view once it’s loaded, making it interactable. 

Code: 

WebElement element = driver.findElement(By.id(“dynamicElement”)); 

 ((JavascriptExecutor) driver).executeScript(“arguments[0].scrollIntoView(true);”, element); 

 Why it works: scrollIntoView(true) ensures the element is brought into the visible area of the browser window, regardless of its position on the page. 

Scenario:  

In one of my projects, we had an infinite scroll feature on a product catalog page. As users scrolled, more products were dynamically loaded. I used this approach to scroll to a specific product and perform an action like ‘Add to Cart’ without waiting for the entire page to load initially. 

Q7: Your roles and responsibilities in the current/previous project?

Explanation:  

Here, the interviewer wants to gauge your involvement in the project. This is your chance to explain the scope of your work, your contributions, and how you collaborated with the team. 

Scenario:  

In my current project, I am responsible for developing and maintaining the automation framework. I created and integrated the data-driven approach using Selenium, Java, and TestNG. I also handle test script execution, create reusable utility methods, and manage the integration with Jenkins. Additionally, I perform manual testing for complex scenarios and collaborate with developers to debug and troubleshoot issues. 

Q8: Have you given estimation points? How? Explanation?

Estimation points are used in Agile methodologies (like Scrum) to estimate the effort required to complete a task. Estimations are typically done in story points or hours, based on complexity, effort, and time. 

Scenario:  

Yes, in my previous project, I participated in sprint planning sessions where we used story points to estimate the complexity of tasks. For example, automating a simple login test was assigned 2 story points, while automating a multi-step checkout flow was assigned 5 points due to its complexity. We used planning poker as a team to ensure consistency in our estimates. 

Q9: Where have you used switchTo()?  

Explanation:  

In Selenium WebDriver, switchTo() is used for handling windows, frames, and alerts. If the test involves switching between multiple windows or interacting with frames and pop-ups, you use switchTo() to bring the focus to the correct element. 

Scenario:  

“In my previous project, I used switchTo() when interacting with pop-up windows. For example, after clicking a ‘Download’ button that opened a new browser window, I switched to the new window to verify the file was downloaded: 

Code: 

String mainWindow = driver.getWindowHandle(); for (String windowHandle : driver.getWindowHandles()) { if (!windowHandle.equals(mainWindow)) { driver.switchTo().window(windowHandle); break; } }  

This ensured that we were working with the correct window while performing verifications. 

Q10: How do you enter text without using sendKeys()?  

Explanation:  

There are cases when sendKeys() may not work (e.g., with hidden or complex input fields). In such cases, you can use JavaScript to directly set the value of an input field. 

Code: 

JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript(“document.getElementById(‘inputField’).value=’Some Text’;”);  

Why:  

This directly interacts with the DOM to set the value of the input element without using sendKeys() 

Scenario: 

In my project, we had an input field that was dynamically hidden under certain conditions. Since sendKeys() couldn’t interact with it, I used JavaScript to enter text into the field for validation purposes, ensuring that the value was correctly set. 

Q11: In your project, where do you have your test data and how do you access it? 

 Explanation: Test data management is crucial for test automation. Typically, test data can be stored in external files such as Excel, CSV, JSON, or databases. The data is then read and used in test cases for validation. 

Scenario: *“In my project, we stored the test data in Excel files for its simplicity and flexibility. We used Apache POI library to read data from Excel and pass it into our test cases. For instance: 

code: 

FileInputStream file = new FileInputStream(new File(“testdata.xlsx”)); 

 XSSFWorkbook workbook = new XSSFWorkbook(file); XSSFSheet sheet = workbook.getSheetAt(0);  

String username = sheet.getRow(1).getCell(0).getStringCellValue(); 

This allowed us to perform data-driven testing, where the same test script could be executed with different sets of data. 

Q12: Difference between scenario and scenario outline with regards to your project Explanation?

Scenario: In Cucumber, a scenario represents a single test case with specific data. It’s written with a set of actions (Given, When, Then) that describe the steps to execute.  

Scenario Outline: A scenario outline is used when we need to run the same test with multiple sets of data. It defines a template where placeholders are filled with data in the examples section. 

 Scenario:  

In my project, I used Scenario Outline when we needed to run the same steps for multiple input data, like testing different login credentials. For example: 

Code: 

Scenario Outline: User login Given User navigates to the login page When User enters and Then User should be logged in Examples: 

 | username | password | | user1 | pass1 | | user2 | pass2 |  

This helped us run the same test scenario with different sets of data without writing multiple identical scenarios. 

Q13: Have you handled exceptions? Explain.  

Explanation: 

 In Selenium, handling exceptions is crucial to ensure that the tests continue running even if something goes wrong, like an element not being found. You can use try-catch blocks to catch exceptions and log them. 

Scenario: 

 In my project, I frequently handled NoSuchElementException and TimeoutException. For example, when waiting for elements to appear on the page, I used explicit waits: 

code: 

WebDriverWait wait = new WebDriverWait(driver, 10); WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id(‘submitBtn’)));  

This allowed the script to wait for the element and continue without failing immediately.  

I also used try-catch blocks to catch errors and log them for better debugging. 

Q14: Other managerial questions: 

Why Accenture? Explanation:  

This is a common interview question where the interviewer expects you to demonstrate knowledge about the company and express why you specifically want to work there. Focus on Accenture’s values, global reach, and its reputation in technology and consulting. You should also align your career goals with the opportunities that Accenture provides. 

Q15: What would you do if the customer tells you to stop working on the current user story and prioritize a high-priority user story? Explanation:  

This question evaluates your ability to prioritize tasks under changing circumstances. The key here is to show that you can assess the impact, communicate effectively with stakeholders, and re-align priorities while keeping the project on track. 

Q16: How will you manage tight deadlines? Explanation:  

This question gauges your ability to handle pressure and deliver quality work on time. The key to managing tight deadlines is prioritizing tasks, being organized, and leveraging available resources effectively. 

Q17: What challenges have you faced in your project? Explanation:  

This question aims to evaluate your problem-solving abilities. Focus on a real challenge you faced in a project, how you handled it, and the outcome. Be honest and show how you turned a challenge into an opportunity to improve. 

Author’s Bio:

From Testleaf’s Learner Community.

Learn other selenium interview questions.

Learn other Automation Interview Questions.

Learn other Java Interview Questions.

Accelerate Your Salary with Expert-Level Selenium Training

X