Add office photos
Engaged Employer

Wipro

3.7
based on 54.4k Reviews
Video summary
Filter interviews by

10+ Hetero Biopharma Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Write a program to remove duplicate character in a string if there are multiple users in an application, and if the buttons in the applications are specific to particular user, you need to perform operation in...

read more
Ans.

Questions related to Selenium Automation and software testing

  • To remove duplicate characters in a string, use a loop and a hashset

  • To perform operations on specific buttons for a user, use conditional statements

  • To switch to a particular tab, use the window handle

  • 500 error code in Postman validation indicates a bad request

  • Primary key is a unique identifier for a record in a database

  • Roles and responsibilities in a project depend on the project and team

Add your answer

Q2. In a page there are two login button available, So will it have same ID?

Ans.

No, the two login buttons should not have the same ID.

  • IDs should be unique for each element on a page

  • Having two elements with the same ID can cause issues with locating and interacting with the elements

View 1 answer

Q3. How will you retrieve all the values from the drop down?

Ans.

To retrieve all values from a drop down, we can use the getOptions() method and store the values in an array of strings.

  • Locate the drop down element using any of the locators

  • Create a Select class object by passing the drop down element as a parameter

  • Use the getOptions() method to retrieve all the options from the drop down

  • Store the options in an array of strings

Add your answer

Q4. How to write the step execution report/result in the report?

Ans.

Use TestNG or JUnit framework to generate step execution report/result.

  • Use TestNG or JUnit annotations to mark the start and end of each test step.

  • Use TestNG or JUnit listeners to capture the test results and generate the report.

  • Use reporting libraries like ExtentReports or ReportNG to generate detailed reports with screenshots and logs.

Add your answer
Discover Hetero Biopharma interview dos and don'ts from real experiences

Q5. How to switch to the second window using page Title?

Ans.

To switch to the second window using page title, we can use getWindowHandles() and switchTo() methods.

  • Use getWindowHandles() method to get all the window handles

  • Iterate through the window handles and switch to the desired window using switchTo() method

  • Use getTitle() method to get the title of each window and compare it with the desired title

Add your answer

Q6. What are the collections used in framework?

Ans.

Collections like ArrayList, HashMap, HashSet are commonly used in Selenium framework.

  • ArrayList is used to store a list of elements

  • HashMap is used to store key-value pairs

  • HashSet is used to store unique elements

  • Collections class is used for sorting and searching

Add your answer
Are these interview questions helpful?

Q7. Difference between simple Java program and maven project

Ans.

A simple Java program is a standalone program while a Maven project is a build automation tool.

  • A simple Java program is compiled and executed using the command line or an IDE.

  • A Maven project uses a pom.xml file to manage dependencies and build the project.

  • A simple Java program may require manual management of dependencies.

  • A Maven project can easily manage dependencies and build the project with a single command.

  • A simple Java program may not have a defined project structure.

  • A ...read more

Add your answer

Q8. Why do tags used in cucumber

Ans.

Tags are used in Cucumber to organize and filter scenarios and features.

  • Tags allow for easy organization of scenarios and features based on their purpose or functionality.

  • Tags can be used to filter which scenarios or features are run during a test.

  • Tags can be added to scenarios or features using the '@' symbol followed by the tag name.

  • Tags can also be used to pass parameters to step definitions.

  • Examples: @smoke, @regression, @login, @api, etc.

Add your answer
Share interview questions and help millions of jobseekers šŸŒŸ

Q9. How to disable test.

Ans.

To disable a test, we can comment out the test code or use testNG annotations.

  • Comment out the test code

  • Use testNG annotations like @Test(enabled=false)

  • Use testNG XML file to disable the test

  • Use groups to disable a set of tests

Add your answer

Q10. Difference between TestNg and junit

Ans.

TestNG is more advanced and flexible than JUnit, with features like parallel testing and data-driven testing.

  • TestNG supports parallel testing while JUnit does not.

  • TestNG allows for data-driven testing while JUnit does not.

  • TestNG has more advanced annotations and reporting features than JUnit.

  • TestNG can be used with both Java and non-Java languages while JUnit is only for Java.

  • JUnit is simpler and easier to learn than TestNG.

Add your answer

Q11. Priority in TestNg

Ans.

Priority in TestNG determines the order in which test methods are executed.

  • Priority can be set using the 'priority' attribute in @Test annotation

  • Default priority is 0, higher priority is executed first

  • Priority can be negative as well

  • If two methods have the same priority, they are executed in alphabetical order

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ā¤ļø in India. Trademarks belong to their respective owners. All rights reserved Ā© 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter