Top 10 Selenium FAQs

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?

A: Selenium 1.0 is better known as Selenium RC and Selenium 2.0 as Selenium Webdriver. In Selenium RC, a webdriver will be automated by injecting javascript into it and commands will be driven by sending them to a server but Selenium Webdriver can communicate directly with the browser and no server is needed.

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.

Code snippet-

Proxy proxy = new Proxy();

proxy.setProxyAutoconfigUrl(“http://youdomain/config”);

// We use firefox as an example here.

DesiredCapabilities capabilities = DesiredCapabilities.firefox();

capabilities.setCapability(CapabilityType.PROXY, proxy);

// 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>