seleniumonlinetutor

Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Training |

Question: What do you mean by Wrapping Selenium Calls? Answer: As with any programming, you will want to use utility functions to handle code that would otherwise be duplicated throughout your tests. One way to prevent this is to wrap frequently used selenium calls with functions or class methods of your own design. For example, […]

Read More »
seleniumonlinetutor

Selenium Interview : How will you capture screenshot in Selenium webDriver?

How will you take screenshot in Selenium webDriver? Answer: The screenshot can be taken by using getScreenshotAs() method. The sample code is as follows: public class myTestSuite { @Test public void testcase1() { // Open Firefox WebDriver driver=new FirefoxDriver(); // Maximize the window driver.manage().window().maximize(); // Open the url driver.get(“http://www.google.com”); // Take screenshot and store as […]

Read More »

Selenium Interview : What is the difference between findElement and findElements?

What is the difference between findElement and findElements? Answer: Both methods are abstract method of WebDriver interface and used to find the WebElement in a web page. findElement() – it is used to find the one web element. It return only one WebElement type. findElements()– it is used to find more than one web element. […]

Read More »