Test Your Basics of Selenium WebDriver – Java By Answering These Interview Questions
Following is a list of basic questions of Selenium WebDriver – Java. It will help you to test your basic knowledge as well as for interviews as well. All the best.
- What are the locators available in Selenium WebDriver?
- What are difference between findElement() and findElements()?
- How can you launch any browser in Selenium WebDriver?
- Why we need to set browser executable path as system properties to launch a chrome browser?
- What error will be hrown when browser executable path is not set.
- What are differences between get() and to() mehods?
- What are difference between Selenium webDriver click() and Javascript click()?
- Explain some methods of Xpath.
- What are limitation of CSS Selector?
- What is difference between name and className locators?
- What are differences between absolute Xpath and relative Xpath? Which is preferred?
- List some important interfaces in Selenium WebDriver?
- What are methods available in WebElement interface?
- What are methods available in WebDriver interface?
- What is RemoteWebDriver?
- Which interface is used to capture screenshot?
- Which interface is used to run Javascript commands?
- Is it mandatory to up cast browser driver class object to WebDriver?
- How you will identify if a check box is checked?
- How you will identify if a radio button is selected?
- How you will identify presence of a WebElement?
- How you will identify absence of a WebElement?
- How you will identify viability of a WebElement?
- How you will identify invisibility of a WebElement?
- Write code snippet to find a element using any locator.
- Write code snippet to find multiple elements and get the size?
- Write code snippet to capture screenshot.
- Write code snippet to execute a Javascript query.
- Write code snippet to retrieve a text of an element. Assert if it is not null.
- How to retrieve current url? Write code snippet and split the website name only. For example :- www.facebook.com , then extract only “facebook”.
- How to get current title of a page? Can a web page be without title?
- What are differences between WebDriver and WebElement?
- What are waits provided by Selenium WebDriver?
- How implicit wait is different from explicit wait in Selenium?
- What is WebDriverWait?
- Write code snippet to configure a WebDriverWait instance.
- Write code snippet to configure a FluentWait instance.
- What are differences between WebDriverWait and FluentWait?
- What is NoSuchElementException?
- When you get TimeoutException in Selenium?
- When does StaleElementReferenceException occur?
- How to get all clickable links from a web page?
- How to find broken links of a web page?
- What is page load timeout and how you set it?
- Write code snippet to configure implicit wait in Selenium?
- What is difference between page load timeout and script time out ?
- What are inner interfaces are available in WebDriver interface?
- How to navigate through browser history?
- What is difference between close() and quit()?
- What is By in Selenium WebDriver?
- Write code snippet to delete all cookies?
- How to get total frame counts including inner frames of a page?
- In how many ways we can switch to frame?
- What is difference between parentFrame() and defaultContent() methods?
- What is window handle?
- Can we get a window handle of a window without title?
- What is return type of getWindowHandle() and getWindowHandles()?
- Write code snippet to navigate through multiple windows and retrieve its title and url.
- What is Page Object Model design pattern?
- What is PageFactory?
- What is difference between POM and PageFactory?
- What is @FindBy annotation?
- Write code snippet of a simple Page Object class.
- What are advantages of using Page Object Model?
- What are limitations of using PageFactory?
- What are modules in your framework?
- What are utilities methods you have added in your framework?
- How you read data from excel in Java? Write code snippet.
- How to read data from properties file in Java?
- How many Selenium frameworks you have come across?
- What do you understand by data driven framework and in how many ways we can implement the same?
- What do you understand by keyword driven framework and in how many ways we can implement the same?
- How you will arrange your test scripts?
- What are key factors you consider for stability of tests?
- When we get NoSuchWindowException ?
- How to verify if an alert is present?
- Write code snippet to handle alert?
- How you will decide where Alert can be used?
- Draw WebDriver hierarchy.
- Draw and explain architecture of Selenium WebDriver?
- What are challenges you feces while scripting scenarios using Selenium WebDriver?
- How to upload a file in Selenium WebDriver?
- What is Selenium Grid?
- How to scroll to an element in Selenium Webdriver?
- What are reporting tools you have used with your selenium framework?
- What is Actions class in Selenium and when to use?
- How do you select a value in drop down created using select tag?
- How to select value in a non-select drop down?
- How does Select class work? List out its methods.
- How to get CSS properties of a WebElement?
- What is difference between getText() and getCssValue() methods?
- How many languages bindings of Selenium Webdriver are available?
- What is EventFiringWebDriver?
- What are alternatives of Selenium?
- What are key points you keep in mind while scripting?
- What is use of getAtrribute() method?
- How to perform mouse hover? How it helps in capturing tooltip?
- In which condition sendKeys() can be used to upload file? If sendKeys() does not work then what are alternatives?
- How to upload a file to hidden or inaccessible input tag?
- What are new features available in Selenium 4?
- How to assert if a text box accepts only numbers?
- How to implement boundary value analysis while scripting?
- How to fetch a specific column in a WebTable?
- What are design pattern you have used?
- How to select a value from calendar?
If you have any doubt, feel free to comment below.If you like my posts, please like, comment, share and subscribe.#ThanksForReading
#HappyLearning