PyjamaHR interview question

Explain your experience with automation tools (like Selenium, JUnit, etc.). Write a simple code to reverse a string in Python. What are locators in Selenium? Explain their types. How would you approach testing a new feature that’s added to a software product?

Interview Answers

Anonymous

21 Apr 2025

1)i have hands on experience with selenium webdriver for automating web applications. I used selenium with java to write test framework. I've created and axecuted test cases, handeld dynamic elements using various locators, and implemented waits and assertions. for unit testng, i Used JUNIT to write test cases for small utilities in the framework. I also have experience using testNG for grouping and reporting and maven for dependency management. 2) def reverse_string(s): return s(::-) print(reverse_string("Hello")) 3)Locators are used to find elements in HTML on web page for automation. The main types are 1)Name- By the element's name attribute: By.Name 2)Class Name - Tragets class attribute: By.CLASS_NAME 3)Tag Name- Targets HTML tag: By.TAG_Name 4)Link Text- For exact match of link text: By.LINK_TEXT 5)Partial Link Text- For partial match in link: By.PARTIAL_LINK_TEXT 6)XPath- For complex locators using XML path: By.XPATH 7)CSS Selector- For targeting elements using CSS rules: By.CSS_SELECTOR 4) 1 Understand the requirements from the product owner or specification. 2 Write test scenarios and cases covering positive, negative, and edge cases. 3 Check for dependencies or impacted areas to plan regression testing. 4 Execute manual or automated tests for the new features 5 Log defects, if any, and verify fixes. 6 Perform regression testing on related modules. 7 Ensure compatibility and usability, and finally sign off after validation

Anonymous

22 Apr 2025

Selenium is a Java based s/w testing framework and helps to test the software's by automating few testing steps via coding saving time and effort. JUnit helps to write unit tests in Java for unit testing of the application. .reverse() function can be used or run a reverse for loop To test a new feature that is added to a software I will first create a test plan with all the scenarios and then create the test cases for each scenario, after that I will execute the test cases and record whatever results I am getting and will verify if the results meet the customer requirements or not after that I will pass on the errors to the developers to fix. I will hand over the test report to the team lead.