Java for Testers – Interview Questions and Answers Part-13 1) Java Program: Change a string such that first character is upper case, second is lower case and so on? public static String changeToUpperCase(String str) { StringBuffer s = new StringBuffer(); char ch = ' '; for (int i = 0; i < str.length(); i++) {…
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…
Java for Testers – Interview Questions and Answers Part-12 1) Explain about Diamond problem in Java? The “diamond problem” is an ambiguity that can arise as a consequence of allowing multiple inheritance. The problem occurs when there exist methods with same signature in both the super classes and subclass. On calling the method, the compiler…
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…
Java for Testers – Interview Questions and Answers Part-11 1) What is verbose? Verbose is an option that can be used on the Java command to enable debug output for class loading. 2) What is thread count? The Thread Count parameter specifies the maximum number of simultaneous requests the server can handle. When the server…
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?…
Selenium Java Interview Questions and Answers Part-11 1) How to get the html source code of a particular web element using Selenium WebDriver? We can get the html source code of an element using getAttribute method. driver.getAttribute("innerhtml"); 2) What are the different driver classes available in Selenium WebDriver API? Selenium WebDriver API consists of…
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…
Java for Testers – Interview Questions and Answers Part-10 1) What is a Class in Java? A class is the blueprint from which individual objects are created. It is the basic building block of an object-oriented language such as Java. Ex- class ClassName { // variables // methods } 2) What is the difference between…