Selenium has become the most widely used test automation tool in the world and hence the demand for selenium experts has increased enormously in the recently. The demand is increasing consistently and many selenium tutorials have come up to help the aspirants who are eager to make a good career in software testing.
Selenium training courses are receiving an overwhelming response and many are joining these courses. At this juncture, this article discusses the top 10 frequently asked Top 10 Selenium FAQs.
1: What are Selenium 1.0 and Selenium 2.0?
2: What is the need to have Webdriver when there is Selenium IDE?
A: Selenium IDE is just an add-on for Firefox and all it does is support record and run of Selenium test scenarios and thus to make the test automation script generation much faster. Performing logical flows and parameterization is not possible in Selenium IDE.
3: Name the Browsers supported by Selenium Webdriver.
A: Mozilla Firefox, Google Chrome, Internet Explorer, Safari, and Opera support Selenium Webdriver.
4: If an object has been identified using XPath and if the same has been executed on a separate browser, will the test get broken?
A: Yes. Because there is a difference in identifying the objects using XPath by different browsers.
5: Can webdriver be programmed in languages other than Java?
A: Yes, it is possible as webdriver supports many programming languages such as C#, PerI, Ruby, Python, PHP etc.
6: How can the proxy be configured?
A: It can be done using desired capabilities class.
Proxy proxy = new Proxy();
// We use firefox as an example here.
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
// You could use any webdriver implementation here
WebDriver driver = new FirefoxDriver(capabilities);
7: How much of Java, one should learn before going for Webdriver training?
A: One should have knowledge of basic Java and should be familiar with OOPs concepts.
8: How should the Popups and Alerts be handled?
A: Popups and Alerts are considered new windows by Java and you need to get the window handle first to handle them. Once it is available to use “Switch To()” command to handle them.
9: How are cross-browser testings done using webdriver?
A: As mentioned earlier, webdriver is compatible with multiple browsers and operating systems. However, one needs to take the help of Selenium Grid to do cross-browser testing.
10: JUnit or TestNG, which unit test framework is better with Webdriver?
A: TestNG will be the best option with webdriver as JUnit has many limitations from a testing perspective.