Selenium Interview Questions For Experienced | Selenium Webdriver Interview Questions For Experience

SELENIUM WEBDRIVER INTERVIEW QUESTIONS FOR EXPERIENCE

• What are the challenges you have faced during testing?
• What strategies you followed while building a selenium framework from scratch?
• Where do you perform the singleton design pattern? If you don’t use it, then do you have an idea about this?
• Difference between Implicit, Explicit and Fluent waits in Selenium?
• Pros and cons of Implicit wait and Explicit wait.
• Why we prefer explicit wait instead of fluent wait? What are the disadvantages of fluent wait?
• Without implicit wait selenium script will work or not?
• What is default polling time in explicit wait and in implicit wait?
• Explain about synchronization in selenium?
• Which concept they have implemented in explicit and fluent wait?
• Explain abstraction and interface respect of selenium with some example
• Difference between Factory design and Singleton framework?
• What is page object and page factory model?
• Have you used interface in your framework other than selenium interfaces?
• How do you achieve inheritance in your framework?
• What is Webdriver, Name methods which do not have the implementation?
• What are the methods present in the webdriver interface?
• What's the fastest locator in Selenium?
• What does :: ( doubles colon ) in sibling xpaths represent?
• Explain. “Driver.manage.window.maximize” (talk about option interface here)
• What is difference between get() and navigate().to() in Selenium?
• How would you check the broken links, in the webpage?
• Difference between submit() and click() in Selenium?
• Difference between absolute XPath ( / ) and relative XPath ( // )
• Difference between findelement and findelements?
• Difference between frames and iframes?
• Return type of findelement and findelements?
• What error will be thrown when no element found for findelement and findelements?
• State some exception which you have faced in your framework? (Don’t mention only selenium explain. Explain java exception also)
• Types of Exceptions and how to handle stale element exception?
• What are the interface used in selenium?
• Where do you used inheritance in selenium?
• How do you initialize web elements in POM? What error or exception will come if not initiated?
• If both wait method that is implicit and explicit is mentioned in the script, then which one is work? is it good practice to mention both in good?
• What is the difference between close and quit in selenium?
• How do you handle Alert in Selenium?
• In a web page, there are several Pop-up, but we don’t when the pop-up will appear, in this case how we will handle the Pop-up using Selenium WebDriver (Java)
• How to handle file upload when type attribute does not file for upload web element.
• How to cover character keyboard operation from the context menu utilizing user-defined keyword?
• Consider this snippet Web driver driver=new chromedriver(); what does the above code snippet mean?
• Where can “Dynamic Polymorphism” in Selenium WebDriver be observed?
• What is the difference between “/” and “//” in XPath?
• If proper Xpath, CssSelector and ID are not available, how do you identify an object?
• Attributes of CSS Selector?
• Which is most faster xpath or css?
• How to get n-th element using XPath and CSS?
• Consider you are only allowed to use css locator, how will you find the parent/grandparent of a web element?
• Will driver.findelements() throw an exception ?
• What is returned by driver().manage() ?
• In selenium, if you want to access the element that has the text “This element has an ID that changes every time the page is loaded” in it, then which of the following will you use?
• On page Object Model Framework (POM), how do you initialize the elements of a page to be used in the runner class? (name of the PageObjects class is “”SignupPage.java”” and the dirver object name is “”driver””).
• Get the values from the dropdown and print them in Ascending order
• Using TreeSet to find elements command
• Does takes screenshot is interface or class
• Selenium uses lots of third parties jars for scripting. Then why do we still go for selenium?
• Why do we have to use build() and perform() with the action object
• Can we use perform() along in scripting without build()
• What is difference between build() and perform() in selenium?
• Return type of getwindowhandle() and getwindowhandles()?
• Window Handling in Selenium -Switching from another window to Parent window
• If the button is disabled? how to check -using getattribute()
• Explain method overloading with selenium and some example
• How do you read excel in the script? (very careful while answering. the counter-question will come as per your answer)
• Do you use the property file in your framework? If yes, then which java concept gets utilize here? (Java Collection)
• On a web page, there are several Pop-up, but we don’t when the pop-up will appear, in this case how we will handle the Popup using Selenium WebDriver (Java)
• Started automation test suite execution and few test cases are failed in a test run. How can you execute only failed test cases at once (with one click) what design pattern do we use when we trigger different browsers?
• What are approached to handle dynamic WebElement?
• Click last option in the dropdown (Last drop-down changes dynamically)
• How to calculate links on a page? (Answer with HTML tag)
• Write the code to read the value from the excel sheet.
• What is Page Factory in POM Design pattern?
• Suppose you have 10 pages in your application then how to achieve POM. What you will do?
• Annotation used in Page Object Model?
• Ways to find broken links in Selenium?
• How to handle frame in Selenium?
• How to handle Alerts in Selenium?
• Different types of Navigation Commands?
• Difference between assert and verify?
• How to download a file using Selenium?
• How do you manage a set of Data Tables in Selenium?
• How do you automate localization testing -diff language in UI?
• How to avoid NoSuchElementException without using try/catch block and with try/catch block?
• How to handle web tables whose values change dynamically?
• How to check whether web element is enabled or Disabled without using isEnabled method?
• Why is CSS locator faster than Xpath?
• Even though CSS is faster than Xpath ,why do 95% of the companies use XPath ?
• Error is throwing as Element not found but when I go and check that element is available in the web page? The element is not hidden so no need to use Java script executor? How do you solve this?
• How do you execute using headless mode?
• In Selenium, how to get text value from text-box if gettext() is not working?
• If we are using correct locator but still getting element not found error then how you will resolve this error?
• In Page object model once you create loginpage.java class what is the first thing you start with writing initially. How are you initiating writing something into a page class?
• What if Windows popup occurs during test execution and due to that can't execute automated tests, how u will resolve this error?
• Different ways to handle hidden elements?
• What is the difference between click() function in webelement interface and click() function in Actions class?
• Is it possible to change the behavior of a test at runtime?
• Describe how to handle the below items using selenium -iframe -windows -table -Alerts
• How to click right click of mouse?
• How to scroll down a page?
• What will driver.getWindowHandels() return?
• How will you automate Windows based application?