Posts

Showing posts with the label Automation Tester

Explore essential Java programs commonly asked in interviews, offering valuable coding insights and practice.

 Frequently Asked Java Program 1. Find Duplicate Word  public class DuplicateWordFinder { public static void main(String[] args ) { String input = "Tata,Swift,Audi,Mercedes,Tata,Renault" ; String[] word = input .split( "," ); Set<String> uniqWord = new HashSet<>(); for (String words : word ) { uniqWord .add( words .trim()); } for (String words : uniqWord ) { System. out .println( "Uniq Words are : " + words ); } } } 2.  Even Letter Print From String import java.util.Scanner; public class EvenLetterPrintFromString { public static void main(String[] args ) { // TODO Auto-generated method stub Scanner sc = new Scanner(System. in ); System. out .println( "Enter the Words: " ); String input = sc .nextLine(); for ( int i = 1; i <= input .length() - 1; i += 2) { System. out .println( input .charAt( i )); } } }   3. Remove special characters from string in java import java.util.Scanner; public class ExtractS...

Top 35 frequently asked questions with answers on relative XPath, absolute XPath, dynamic XPath, and CSS selector usage in Selenium

Here are the top 35 frequently asked questions with answers on relative XPath, absolute XPath, dynamic XPath, and CSS selector usage in Selenium, along with their syntax: 1. What is a relative XPath? Relative XPath is an XPath expression that locates an element based on its relationship to another element in the XML or HTML document. Syntax: `//tagname[@attribute='value']` 2. How do you write a relative XPath expression? A relative XPath expression starts with a double forward slash (//) and can use various attributes, such as tag name, class, ID, or other element properties, to locate the desired element. Syntax: `//tagname[@attribute='value']` 3. What is an absolute XPath? Absolute XPath is a complete XPath expression that provides the full path from the root node to the desired element in the XML or HTML document. Syntax: `/root/tagname[@attribute='value']` 4. How do you write an absolute XPath expression? An absolute XPath expression starts with a single for...

Top 100 Selenium Interview Questions and Answers of 2023

Image
 Sure! Here are the top 100 Selenium frequently asked questions along with their answers for someone with 3.5 years of experience: 1. What is Selenium? Answer: Selenium is an open-source automation testing framework used for automating web browsers. 2. What are the different components of Selenium? Answer: Selenium WebDriver, Selenium IDE, Selenium Grid, and Selenium RC (deprecated) are the main components of Selenium. 3. What are the advantages of using Selenium for test automation? Answer: Some advantages of using Selenium for test automation are its open-source nature, multi-browser support, robustness, and compatibility with various programming languages. 4. How does Selenium WebDriver work? Answer: Selenium WebDriver interacts directly with the browser using its native support, enabling more accurate and efficient automation. 5. What programming languages are supported by Selenium WebDriver? Answer: Selenium WebDriver supports multiple programming languages, including Java, C#...