Tuesday, 14 March 2017

Top 50 Selenium Webdriver Interview Questions and Answers for Freshers & Experienced

Top 50 Selenium WebDriver Interview Questions and Answers for Freshers & Experienced

Selenium IDE:

Selenium IDE was developed by Shinya Kasatani of Japan. Selenium Integrated Development Environment is a record and playback tool. Selenium IDE was given to Selenium Job in 2006 by Shinya.

Selenium WebDriver Vs Selenium RC
  •     It’s possible for you to use programming language to design your test script in Selenium WebDriver training and Selenium RC training.
  •     You can run your test scripts on different browsers if you use WebDriver or Selenium RC.
  •     They both don’t support Record and playback.
  •     In Selenium RC, you need to start the server before you execute your test script but in WebDriver there is no need to start the server before executing the test script.
  •     Selenium WebDriver, in comparison to Selenium RC is a bit complex.
  •     Moving mouse cursors are supported in WebDriver but not in Selenium RC.
  •     Enactment of listeners is supported in WebDriver but not in Selenium RC.
  •     In Selenium RC, you should append the full xpath with xpath= but in WebDriver there is no need to append the full xpath.
  •     WebDriver is quicker in comparison to selenium RC because Selenium RC uses Selenium core that is a javascript software which directly interacts with browsers but WebDriver directly
  •     Selenium WebDrivers design isn’t as complicated as of Selenium RC.
  •     interacts with the browser using the Browsers own engine.
  •     Test Results are automatically created in Selenium RC but in WebDriver there’s not built-in Command to create the effects automatically.
  •     Selenium RC has the ability to support new browsers but Selenium WebDriver Can’t.
Edges Of Selenium online training
  1. It’s open source program.
  2. It supports all the operating systems.
  3. It supports almost all the browsers like firebox, IE, Chrome, Safari.
  4. Supports the programming languages like java, Ruby, Python. Php, .Net, and C#.
  5. Multiple Evaluations could be run simultaneously.
  6. It supports mobile Apparatus.
Selenium Webdriver Interview Questions and Answers

1. What’s selenium webdriver?

WebDriver is designed to supply an easier, more succinct development program in addition to addressing some restrictions within the – RC API. Selenium- where itself being reloaded might adjust without the page, WebDriver was created to raised assistance dynamic web-pages. WebDriver’s objective will be to supply a nicely-intended object oriented API that provides improved service for advanced web-app that is contemporary testing problems.Selenium- calls that are primary are made by WebDriver to the browser employing each browser’s native support for automation.

2. How to compose the exams in selenium WebDriver?

In selenium WebDriver, with regards to the programming terminology, I used different examination framework. In H#, NUnit was applied by me, and in Java, I applied JUnit. In either programming terminology, I authored remove and close and exam ways in examination method the webdriver in the tear-down method, and explained visitor webdriver in startup method.

3. How to change selenium webdriver in eclipse?


In eclipse, I included TestNG or JUnit sessions and designed java initiatives. Within the undertaking guide, JUnit or TestNG jar file was included by me. Inside the check category, I used webdriver in test startup and teardown methods. Often, webdriver was employed by me in , beforemethod, aftermethod, afterclass that was beforeclass portions.

4. What’re the conditions to run selenium webdriver?

Depending the coding language, reference files ought to be put into the examination answers in C, on. In, for instance, I included webdriver dlls as well as in Java, I included Selenium-customer- file. And in addition, we eclipse to run webdriver or should have programming IDE like graphic business.

5. What is the distinction between selenium 1.0 and webdriver?

Selenium 1.0 needs Selenium RC to run a check. Nevertheless, webdriver can right launch a browser and function checks.

6. What are the benefits of selenium webdriver?

Selenium WebDriver is hardly inflexible to-use with Ruby, .Net Java or html languages. QA designers who have coding capabilities that are great can use it very effectively.

7. What are the disadvantages of selenium webdriver over selenium 1.0?


QA engineers must have some understanding of plan development in.Net Java, or other dialects because selenium net motorist requires programming abilities.

8. How-to navigate with visitor switches in selenium webdriver?

We could employ website driver’s back method to simulate visitor’s routing button operation.

9. How to handle multiple windows in selenium webdriver?

We can utilize website motoristis windows handler to recognize each window and use transition method to pick on the screen for test.

10. for knowing the items in selenium webdriver, that are the locators useful?

We can utilize brand aspect id, css, xpath incomplete text and Dominic to find factors.

11. How-to function the exams in internet explorer applying selenium webdriver?

We can choose InternetExplorerDriver to make use of identification, when startup a webdriver in the rule. If we should usage of the WebDriver “InternetExplorerDriver “‘s newest and finest features, we must obtain Web Browser Machine.

12) What is Selenium and what is consists of?

Selenium is actually a package of tools for internet screening that is computerized. It is made up of

Grid: With the aid of Grid you can disperse checks on numerous models so that check might be run parallel which helps in reducing the full time for working in browser test suites necessary

WebDriver and RC: It give you the APIs for a selection of languages like Java PHP, etc. With all of the windows Webdriver.

Selenium IDE (Integrated Development Atmosphere): It’s an instrument for recording and enjoying back. It’s a plugin

13) How will you find an element using Selenium training?

In Selenium every object or control in a web page is referred as an elements, there are different ways to find an element in a web page they are

    ID
    Name
    Tag
    Attribute
    CSS
    Linktext
    PartialLink Text
    Xpath etc

14) What’s Selenium 2.0?

Website screening tools WebDriver and Selenium RC are combined in simple instrument in Selenium tutorial 2.0
 
15)What are the advantages of Selenium videos?

    It supports C#, PHP, Java, Perl, Phython
    It supports different OS like Windows, Linux and Mac OS
    It has got powerful methods to locate elements (Xpath, DOM , CSS)
    It has highly developer community supported by Google

16) Note what’s the use of X-path?

X Path is employed to get the WebElement in web pages. It’s likewise in distinguishing the active elements not useless.

17) Clarify the difference between single and double slash in XPath?


Individual chop ‘/ ’

Single chop (/) start assortment from your record node

It allows ‘absolute’ way words to be created by you

Double Decrease ‘ // ’

Double slash (//) start assortment corresponding anywhere inside the record

It helps to generate path expressions that are ‘relative’

18) Checklist out the specialized issues with Selenium video tutorials?


Complex troubles with Selenium are

Selenium webdriver supports only webbased apps

It doesn’t support the Bitmap evaluation

For almost any reporting abilities that are associated have to depend on party instruments that are third

No supplier service for resource in comparison with professional tools like horsepower UFT

Maintainability of materials becomes quite difficult as there is no subject database idea in Selenium videos.

19) What’s the variation between sort tips and kind instructions?

TypeKeys() may trigger JavaScript affair in most of the scenarios while.type() won’t. Form populates the worth characteristic utilizing JavaScript whereas.typekeys() emulates like precise individual writing.

20) What is JUnit Annotations and what are several types of annotations that are helpful?

In JAVA a particular kind of syntactic metadata could be included with Java source-code, this can be recognize as Annotations. Lessons, boundaries, bundles, methods and variables are annotated a number of the JUnit annotations which may be useful are

    Test
    Before
    After
    Ignore
    BeforeClass
    AfterClass
    RunWith

21) My XPath finds elements in one browser, but not in others. Why is this?

The short answer is that each supported browser handles XPath slightly differently, and you’re probably running into one of these differences. The long answer is on the XpathInWebDriver page.[/sociallocker]

22) What’s the variation between confirm and declare directions?

Claim: Declare allows to check not or whether a feature is to the page. The exam may stop about the step when the declared element is unavailable failed. In words that are other, the examination will ended in the level.

Confirm: Confirm demand can examine if it’s not then on performing a examination can carry if the factor is to the page. In evidence, most of the instructions are currently going to manage guaranteed even if any one of check fails.

23) Explain how Selenium Grid works?

Selenium Grid sent the tests to the hub. These tests are redirected to Selenium Webdriver, which launch the browser and run the test.  With entire test suite, it allows for running tests in parallel.

24) Can we use Selenium grid for performance testing?

Yes. But not as effectively as a dedicated performance testing tool like Loadrunner.

25) Explain how to assert text of webpage using selenium 2.0 ?

WebElement el = driver.findElement(By.id(“ElementID”))

//get test from element and stored in text variable

String text = el.getText();

//assert text from expected

Assert.assertEquals(“Element Text”, text);

26) Explain how you can login into any site if it’s showing any authentication popup for password and username?

Pass the username and password with url

    Syntax-http://username:password@url
    ex- http://creyate:tom@www.gmail.com

27) Mention what is the difference between Implicit wait and Explicit wait?

Implicit Wait: Sets a timeout for all successive Web Element searches. For the specified amount of time it will try looking for element again and again before throwing a NoSuchElementException.  It waits for elements to show up.

Explicit Wait :  It is a one-timer, used for a particular search.

28) What is WebDriver?

WebDriver is a tool for writing automated tests of websites. It aims to mimic the behavior of a real user, and as such interacts with the HTML of the application.

29) What are the steps to run automation using selenium?

The very basic steps are:

1. Record the test steps using selenium-IDE.

2. Modify the script according to the testing needs. Add validation points, Java Scripts, Time-out etc.

3. Run the test.

4. View the result after test run complete analyze.

30) What tests can selenium do?

Selenium could do functional, regression, and load of web based applications.

31 )Why are two tools being merged as Selenium 2.0?
 
Selenium 2.0 guarantees to give considerably cleaner API than Selenium RC and at the same time-not being restricted by JavaScript Security restriction like beginning plan that is identical.

32) Thus many people are likely to utilize Selenium 2.0?

Answer: well-no, as an example if you’re employing Selenium Perl customer driver than there is no similar supplying from Selenium 2.0 and till there’s comparable you also would have to stick with Selenium 1.0 library available for Selenium 2.0

33) How is not Selenium 2.0 configuration same from Selenium 1.0?

In case there is Selenium 1.0, you’ll need Selenium vessel file regarding one catalogue; by way of example, in case of Caffeine you’ll need Caffeine client motorist and also Selenium server container file. With Selenium 2.0, words is needed by you’ll
Executed (i.e. Caffeine, D#, etc) and Selenium machine container in case you are using Handheld Remote Control or Remote Website Driver.

34)When to Utilize WebDriver?
 
When requiring increased assistance for WebDriver should be used by one
* Mult-browser assessment including increased operation regarding windows not well-recognized by Selenium-1.0.
Numerous browser windows, * Managing several structures, alerts, and pop-ups.
* Page navigation.
* Get-and-decrease.
AJAX -based UI components.
Benefits of website drivers in comparison with selenium.

1) You can easily simulate hitting top and back button of browser.
2) keyword-driven framework is quite simple to assemble in webdriver.
3) Tabs and springs are far more or less the exact same. RC may also handle.
4) Enactment of fans – a much awaited feature
5) You have classes in Webdriver which help one to reproduce crucial push gatherings of keyboard.
6) Support regarding iPhone and Android screening
7) it is possible to simulate movements of a mouse using selenium.
8) Better functions for Ajax tests.
9) you are able to extract items in mass like QTP. Forex – acquire all links of site. Having RC this is a large hastle
10) You can find coordinates of any item utilizing Webdriver.
11) Unlike RC you don’t need to start a machine in webdriver.

35)Which surfers does WebDriver support?
The existing owners will be InternetExplorerDriver, the ChromeDriver, FirefoxDriver, OperaDriver. For more information these about each, including their comparable skills and disadvantages, please follow the links to the related websites. There’s furthermore support regarding cell testing via IPhoneDriver and the AndroidDriver.

36)What is Selenium 2.0? I have seen often times to this word that was buzz.
Selenium 2.0 can be a relief of two net tests methods:
1) Internet Driver,
2) Selenium RC and
It promises to offer best of both phrases: Selenium and Website Drivers.

37)How to convert selenium 1.0 tests to webdriver tests?

We can use WebDriverBackedSelenium to run Selenium 1.0 tests in webdriver.

WebDriver driver = new FirefoxDriver();Selenium selenium = new WebDriverBackedSelenium(driver, “http://www.yoursite.com”);

38)Which two commands can be used to check that an alert with a particular message popped up?

Use command VerifyAlertPresent

39)What globbing functionality is NOT supported by SIDE?

Globbing supports * or ?, so other patterns are not supported by globbing. We need to use Regular Expressions for that.

40)What Selenese command is used to choose an item from a list?

Select command

41)What is the generic name for an argument (to a Selenese command) which starts with //?

Xpath

42)How to run the tests without a browser or with HTML unit driver in selenium webdriver training?

WebDriver driver = new HtmlUnitDriver();

43)What is webdriver backed selenium?

WebDriver backed Selenium is API that enables running Selenium 1.0 tests in web driver.

44)How to invoke an application in webdriver?

We can use Process to invoke application in the code using web driver.

45)How to run the tests in google chrome using selenium webdriver online?

Sometimes, webdriver cannot launch chrome directly, so (1) we can use Desired Capabilities of WebDriver, put chrome browser application path in the code ; (2) we need to have chromedriver.exe file in the application path. Alternatively, we can manually start chrome driver service, and then launch the test in chrome.

46)What is difference between Master Test Plan and Test Plan.


The differences between Master Plan and Test Plan are given below:

– Master Test Plan contains all the testing and risk involved area of the application where as Test case document contains test cases.

– Master Test plan contain all the details of each and every individual tests to be run during the overall development of application whereas test plan describe the scope, approach, resources and schedule of performing test.

– Master Test plan contain the description of every tests that is going to be performed on the application where as test plan only contain the description of few test cases. during the testing cycle like Unit test, System test, beta test etc

– Master Test Plan is created for all large projects but when it is created for the small project then we called it as test plan.

47)What are selenium supporting testing types?

Selenium tutorials supports two types of testing:

    Functional Testing
    Regression Testing

48)What is selenese?

Selenese is a lanuage which is used for writing test script in selenium IDE.

49)How can you “submit” a form using Selenium training?

    WebElement el  =  driver.findElement(By.id(“ElementID”));
    el.submit();

50)Where the result is seen of Test Execution in Selenium IDE?

The result of test execution is displayed in a Log Window in Selenium IDE.


http://selenium-interview-questions-answers.blogspot.in