Add office photos
Engaged Employer

Tech Mahindra

3.5
based on 33.8k Reviews
Filter interviews by

Varsity Education Management Interview Questions and Answers

Updated 8 Jan 2025
Popular Designations

Q1. How do you find the selected option text from dropdown in selenium?

Ans.

To find the selected option text from a dropdown in Selenium, you can use the getFirstSelectedOption() method.

  • Use the Select class to work with dropdown elements in Selenium

  • Use the getFirstSelectedOption() method to get the selected option

  • Retrieve the text of the selected option using getText() method

Add your answer

Q2. How to switch to frame and come out of it in selenium?

Ans.

To switch to a frame in Selenium, use driver.switchTo().frame() method. To come out of a frame, use driver.switchTo().defaultContent() method.

  • Use driver.switchTo().frame() method to switch to a frame

  • Use driver.switchTo().defaultContent() method to come out of a frame

  • Example: driver.switchTo().frame("frameName");

  • Example: driver.switchTo().defaultContent();

Add your answer

Q3. Given a string ="This is my interview for QA engineer"; write code to give an output of each word with vowel count?

Ans.

Code to output each word with vowel count in a given string.

  • Split the string into words using space as delimiter

  • Iterate through each word and count the number of vowels

  • Store the word and its vowel count in an array of strings

Add your answer

Q4. Given a dropdown contains options with duplicates. Find those duplicates along with its occurrence/frequency?

Ans.

Find duplicates in a dropdown along with their occurrence/frequency.

  • Iterate through the dropdown options and store each option in a hashmap with its frequency.

  • Identify options with frequency greater than 1 as duplicates.

  • Return the duplicates along with their occurrence/frequency.

Add your answer
Discover Varsity Education Management interview dos and don'ts from real experiences

Q5. how to bring specific commit changes to your branch?

Ans.

Use git cherry-pick command to bring specific commit changes to your branch.

  • Identify the commit hash of the specific changes you want to bring to your branch.

  • Checkout to the branch where you want to apply the changes.

  • Use 'git cherry-pick <commit-hash>' command to apply the specific commit changes to your branch.

Add your answer

Q6. Match Atleast one capital, once small case, 1 digit and 1 special character using regex?

Ans.

Regex pattern to match at least one capital letter, one small case letter, one digit, and one special character.

  • Use the regex pattern: (?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[^A-Za-z0-9])

  • Example: Password@123

Add your answer

Q7. How do you resolve merge conflicts in git?

Ans.

Resolve merge conflicts in git by using git commands and tools.

  • Pull the latest changes from the remote repository

  • Use 'git status' to identify conflicting files

  • Open the conflicting files and manually resolve the conflicts

  • Add the resolved files to the staging area using 'git add'

  • Commit the changes with a merge message using 'git commit'

Add your answer

Q8. Given a 2X2 Matrix, find the maximum diagonal sum?

Ans.

To find the maximum diagonal sum in a 2X2 Matrix, sum the elements of the main diagonal and the opposite diagonal.

  • Sum the elements of the main diagonal (top left to bottom right) and the opposite diagonal (top right to bottom left).

  • Compare the sums of both diagonals and return the maximum sum.

  • Example: For a 2X2 Matrix [[1, 2], [3, 4]], the main diagonal sum is 1+4=5 and the opposite diagonal sum is 2+3=5. The maximum diagonal sum is 5.

Add your answer

Q9. Match 14 characters before @ , given an url

Ans.

Extract the 14 characters before @ in a given URL

  • Use string manipulation to extract characters before @ symbol

  • Consider edge cases like no @ symbol or less than 14 characters before @

  • Handle special characters like %20 or %40

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

Top Senior QA Engineer Interview Questions from Similar Companies

4.5
 • 10 Interview Questions
3.8
 • 10 Interview Questions
View all
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
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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