TCS
10+ D2K Technologies India Interview Questions and Answers
Q1. By using driver.findElements().find All elements in the application . using looping "for" to print All links one by one
Using driver.findElements() and a for loop to print all links in the application.
Use driver.findElements() to find all elements in the application
Loop through the elements using a for loop
Print each link one by one
Example: for(WebElement link : driver.findElements(By.tagName("a"))) { System.out.println(link.getAttribute("href")); }
Q2. Whdn prioty -1 and 1 is implimented which will execute first
Priority -1 will execute first before priority 1.
Priority -1 is considered higher than priority 1 in most programming languages.
Tasks with priority -1 will be executed before tasks with priority 1.
For example, in a task scheduling system, a task with priority -1 will be executed before a task with priority 1.
Q3. How to check an integer is palindrome or not
To check if an integer is a palindrome, reverse the integer and compare it with the original integer.
Convert the integer to a string to easily reverse it
Reverse the string and compare it with the original string
If they are the same, the integer is a palindrome
Q4. Explain different types of waits in selenium
Different types of waits in Selenium include implicit, explicit, and fluent waits.
Implicit wait: Waits for a specified amount of time before throwing a NoSuchElementException.
Explicit wait: Waits for a certain condition to occur before proceeding further in the code.
Fluent wait: Waits for a condition to be true with a specified frequency of checking.
Example: WebDriverWait wait = new WebDriverWait(driver, 10);
Q5. How to find a Duplicate from a string
Use a hash set to find duplicates in a string array.
Create a hash set to store unique elements.
Iterate through the array and check if the element is already in the hash set.
If it is, then it is a duplicate.
Example: ['apple', 'banana', 'apple'] -> 'apple' is a duplicate.
Q6. Explain how to find All links
To find all links, inspect the webpage and look for anchor tags with href attribute.
Open the webpage in a browser
Right-click and select 'Inspect' or press F12
In the Elements tab, look for anchor tags ()
Q7. What is pom directory
POM directory is a folder in a Maven project that contains Page Object Model classes for organizing and managing web elements and actions.
POM directory helps in separating the page objects from test scripts for better organization and maintenance.
It contains classes representing web pages with locators and methods to interact with those elements.
Example: src/main/java/com/example/pages
Q8. How to reverse a string
To reverse a string, iterate through the string from end to start and append each character to a new string.
Iterate through the string from end to start
Append each character to a new string
Return the reversed string
Q9. testing tools to be through with
Some testing tools to be familiar with include Selenium, JIRA, and Postman.
Selenium for automated testing of web applications
JIRA for bug tracking and project management
Postman for API testing and automation
Q10. Explain you automation folder structure
Automation folder structure should be organized and easy to navigate for efficient test automation.
Separate folders for test scripts, test data, test results, and configuration files
Subfolders for different test suites or modules
Naming conventions for files and folders to easily identify test cases
Utilize version control systems like Git for managing code changes
Include a README file with instructions on how to run tests
Q11. Please explain Bug life cycle
Bug life cycle is the process of a bug from identification to resolution.
Bug is identified by tester
Bug is logged in bug tracking tool
Bug is assigned to developer
Developer fixes the bug
Bug is retested by tester
Bug is closed if fixed or reopened if not
Q12. difference between QA & QC
QA focuses on preventing defects in the process, while QC focuses on identifying defects in the product.
QA is process oriented, focusing on preventing defects by establishing processes and standards.
QC is product oriented, focusing on identifying defects through testing and inspection.
QA involves activities like reviews, audits, and process improvements.
QC involves activities like testing, inspections, and quality control checks.
Example: QA ensures that the correct testing pr...read more
Q13. Opps concept in java
Oops concept in Java refers to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability of a method to do different things based on the object it is acting upon.
Abstraction: Hiding the implementation details and showing only the necessary feature...read more
More about working at TCS
Interview Process at D2K Technologies India
Top QA QC Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month