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?
Anonym
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