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-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?…
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…
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…
<<Previous Question <<1500 Plus Interview Questions>> Next Question>> How to type into a text box using Selenium WebDriver? Watch the answer for this Selenium Interview Question in a detailed manner in the below youtube video: Note: Don’t forget to subscribe to my Youtube channel. Notes used for explanation in this Youtube…
<<Previous Question <<1500 Plus Interview Questions>> Next Question>> How can you find whether an element is displayed on the screen using Selenium WebDriver? Watch the answer for this Selenium Interview Question in a detailed manner in the below youtube video: Note: Don’t forget to subscribe to my Youtube channel. Notes used…
<<Previous Question <<1500 Plus Interview Questions>> Next Question>> How do I launch the browser using Selenium WebDriver? Watch the answer for this Selenium Interview Question in a detailed manner in the below youtube video: Note: Don’t forget to subscribe to my Youtube channel. Notes used for explanation in this Youtube video…
<<Previous Question <<1500 Plus Interview Questions>> Next Question>> What are the different types of drivers that are supported by Selenium WebDriver? Watch the answer for this Selenium Interview Question in a detailed manner in the below youtube video: Note: Don’t forget to subscribe to my Youtube channel. Notes used for explanation…