- What is Selenium 2.0 ?
Answer : Selenium 2.0 is the integration of the WebDriver API & Selenium RC. WebDriver is designed to provide a simpler, more concise programming interface in addition to addressing some limitations in the Selenium-RC API.
- What are different languages it supports ?
Answer : Automation scripts can be written using WebDriver in any of the following languages. java, C#, Python, Ruby, Perl, PHP
- Is WebDriver class or interface?
Answer : WebDriver is an interface. WebDriver is the name of the key interface against which tests should be written, but there are several implementations.
- What are all different classes implemented WebDriver interface?
Answer : WebDriver implementations include
- HtmlUnitDriver
- FirefoxDriver
- InternetExplorerDriver
- ChromeDriver
- OperaDriver
- What is HtmlUnitDriver ?
Answer : It is the fastest and most lightweight implementation of WebDriver. As the name suggests, this is based on HtmlUnit. HtmlUnit is a java based implementation of a WebBrowser without a GUI.
- Which WebDriver implementation is the fastest ?
Answer : HtmlUnitDriver. Because it executes the tests without launching the browser (headless)
- How to launch firefox browser using WebDriver?
Answer : Using FirefoxDriver we can launcg firefox browser.
WebDriver driver = new FirefoxDriver(); // this will launch firefox browser
- How will you load URL in browser?
Answer : We can loan an URL in browser by calling "get" method
driver.get("http://www.google.com");
- Tell me about different types of element locators?
Answer : By mechanism used to locate elements within a document.
By.id("<Element ID>")
By.name("<Element Name>");
By.cssSelector("<css selector>");
By.xpath("<element xpath>");
By.linkText("<Full content of link text >");
By.partialLinkText("<Partial content of link text>");
- Can we load URL without using "get" method?
Answer : Yes, we can do using navigate() method.
driver.navigate().to("http://www.example.com");
Saturday, October 31, 2015
WebDriver Interview Questions - I
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.