In this tutorial on Selenium in Java, we are going to look at below topics.
Selenium Interview questions and answers in Java
- Introduction
- Selenium Architecture
- Webdriver JSON Wire protocol
- Installation - Selenium + Eclipse + Jar , Maven + Selenium , IntelliJ + selenium + gradle
- Browsers - Launching various browsers like IE, Chrome, Firefox, Microsoft Edge, Safari, HtmlUnit
- Capabilities - Selenium Webdriver Capabilities Significance
- Basic operations - Closing browser window, Navigating to url, Getting window title, Maximizing browser window, Navigate back and forward, How to get current url, How to refresh page, How to get html source code of current page, Resizing and moving browser window
- Element identification - Element Identification methods, Check if element really exists on page , Check if pop up really exists on page
- Element operations - Clicking buttons, links or any other web elements , Entering data in text boxes , Selecting the value from the web list , Reading all items or values from the drop down box , Selecting the check box , Reading the value from the list box , Uploading file , Verify if button is disabled, Verify if button is enabled , Verify if check box is selected, Verify if radio button is selected, Verify if element is displayed on web page, Reading any attribute value , Reading CSS value , Press Tab key using Selenium, Press Enter F1 key in Selenium, Press control, shift and delete keys in Selenium, Clearing data from text box, Verify if any text is present
- Synchronization - Adding synchronization points - (implicit wait, explicit wait, wait until page loads), How to avoid Thread.Sleep in Selenium , wait until element is displayed, Wait Conditions, wait until element disappears, wait until page title changes, check if element exists, Fluent Wait
- Advanced XPATH and CSS expressions - Advanced XPATH expressions to identify the elements , Finding relative elements using XPATH, Advanced CSS expressions
- Working with tables - Reading table cell value , Reading data from web tables , Finding total number of rows and columns
- Window related things - Uploading a file, Downloading file
- Actions - Performing drag and drop action , Double clicking the web element, Performing mouse hover action , Opening context menu (right clicking) on webpage
- Exceptions - Exceptions in Selenium, Common errors and exceptions
- Switching context - Handling multiple browser windows (tabs) , Handling alerts (modal dialogs) , Switching to frames, Handling window dialog in Selenium , Switching to default content
- JavascriptExecutor - Executing custom Javascript , How to scroll to element in Selenium , Click not working Selenium, Enter data in text box using JavaScript, Selecting drop down value using JavaScript
- Frameworks with selenium - Keyword driven frameworks in Selenium , Reading and writing data in excel file, Page object and factory models, JUnit and Selenium, TestNG with Selenium , Data driven, Hybrid, Framework Utilities (Killing processes, date and time operations, String conversions, Random numbers, Generating uniue random numbers), Taking a screenshot in Selenium , Logging framework in Selenium, Advanced reporting using screenshots and videos
- BDD frameworks - JBehave, Cucumber, Gauge
- Miscellaneous - xvfb and vnc in selenium, Setting Proxy, Selenium IDE, Chrome plugin to create page object models, Hide and Minimize the browser, EventListeners in Selenium
- Integration with CI servers - TeamCity, Jenkins, Bamboo
- Selenium in Cloud - SauceLabs and BrowserStack
- Mobile application testing - Appium (Android and iOS web/native/hybrid applications), Mobile emulation using chrome, Selendroid
- Selenium grid - RemoteWebdriver in Selenium, Selenium Grid
- Comparing selenium with other tools - Difference between Selenium Webdriver and UFT (QTP) , Difference between Selenium and UFT, Difference between Selenium and Lean FT, Difference between Selenium and Appium
- Challenges in Selenium automation - Limitations of Selenium, Handling windows dialog using AutoIT
Selenium Interview questions and answers in Java