Usage Of TestNG expectedExceptions Attribute In Selenium WebDriver With Example

expectedExceptions Is very good feature of testng using which we can Ignore known but not required exceptions. In your selenium webdriver test execution, You can use expectedExceptions when you know that any specific @Test method can throw specific exception but It Is not much more Important and you wants to Ignore that exception. If you have used … Read more

List Of Interview Questions For Selenium WebDriver

Part 17 78 : What Is the syntax to get value from text box and store It In variable. Answer : Most of the time, String In text box will be stored as value. So we need to access value attribute(getAttribute) of that text box as shown In bellow example. String Result = driver.findElement(By.xpath(“//input[@id=’Resultbox’]”)).getAttribute(“value”); VIEW … Read more

How To Group And Run Selenium Test Cases Using Testng

Grouping tests Is another very good feature of testng using which you can create group of test methods. You can create a group of test methods based on functionality and features, or based on modules or based on testing types like functional testing, sanity testing etc.. This way you can differentiate specific group test methods from … Read more

TestNG Interview Questions And Answers For Selenium WebDriver

Part 16 73 : How to set priority of @Test method? What Is Its usage? Answer : In your software web application’s test case, you can set priority for TestNG @Test annotated methods as bellow. @Test(priority=0) Using priority, We can control @Test method execution manner as per our requirement. That means @Test method with priority = 0 will be executed 1st … Read more