Selenium Java Interview Questions and Answers Part-18 1) Explain the usage of different annotations available in TestNG? @BeforeSuite – Method will run before all tests run in the suite @AfterSuite – Method will run after all tests run in the suite @BeforeTest – Method will run before any test method within the class is run…
Selenium Java Interview Questions and Answers Part-17 1) What is the name of the plugin that is used to integrate Eclipse with Cucumber? Cucumber Eclipse Plugin can be used in Eclipse to integrate with Cucumber. 2) What is the meaning of TestRunner class in Cucumber? TestRunner class is the starting point from where the execution…
Selenium Java Interview Questions and Answers Part-15 1) What are the difference between Jbehave and Cucumber? – JBehave is pure Java Framework, and Cucumber is Ruby-based. – JBehave are based on stories while Cucumber is based on features. 2) Explain when to use Rspec and when to use Cucumber? Rspec should be used when developers…
Selenium Java Interview Questions and Answers Part-14 1) What are the different ways to customize TestNG report? We can customize TestNG reports in 2 ways: – Using ITestListener Interface – Using IReporter Interface 2) What is required to generated the PDF reports? To create pdf report we need a Java API called IText. 3) What…
Selenium Java Interview Questions and Answers Part-13 1) Explain how will automate drop down list ? How will you get size ? and text present in it? We can use the Select class and methods to automate drop down list. We will get the size of the items by using getOptions() method. We can iterate…
Selenium Java Interview Questions and Answers Part-12 1) Can we test APIs or web services using Selenium WebDriver? Selenium directly cannot test APIs or web services but we can use Java libraries like Rest Assured to do the same. 2) How can we locate an element by only partially matching its attributes value in XPath?…
1) What are the differences between methods and constructors? Answer: The below is the answer for this question: When compared to Methods: 1. Constructors won’t have any return type 2. Constructors should have the same as the Class name 3. Constructors are automatically called when objects are created For detailed answer with practical examples and…
1) What is the difference between == and equals()? Answer: The below is the answer for this question: == operator compares the string objects, where as equals() function compares the text stored in the string objects. public class Demo{ public static void main(String[] args) { String a = new String("Hello" ); String b = new…
1) What is the output of System.out.println(10+20+”Hello”+”World”);? Answer: The below is the answer for this question: public class Demo{ public static void main(String[] args) { System.out.println(10+20+"Hello"+"World"); } } Output: 30HelloWorld For detailed answer with practical examples and explanation of this answer, you can check the below youtube video: 2) What is the output of System.out.println(“Hello”+”World”+10+20);? Answer:…
Selenium Java Interview Questions and Answers Part-10 1) Can Selenium automate Client Server applications? No Selenium cannot automate Client Server applications but there are other tools like Winium and AutoIt which can be used to automate desktop applications. 2) What are the limitations of Selenium WebDriver? – It supports Web based applications only – Limited…