Selenium IDE Interview Questions And Answers

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

31. What Is Assertion In Selenium?

Assertion is nothing but a check or verification point. Assertion verifies the state of the application conforms to what is expected. Examples include "make sure the page title is X" and "verify that this checkbox is checked.

54. What Are The Important Selenium Ide Commands Or Selenese Commands?

Important Commands are: Open, click, type, select, assertText, assertTitle, assertTextPresent, verifyText, verifyTextPresent, veriftTitle, waitForText, waitForTextPresent, waitForTitle, store, storeText, storeTitle, check, uncheck, pause, mouseover, etc...

51. What Are The Important Features Of Selenium Ide?

It has Record and Playback features to create and execute Test cases User/Tester can type Test steps using element locators and Selenese commands without using Recording feature. Debugging feature for debugging test cases. It has an option of asserting title of every page automatically. Option to run single test or multiple tests(Test suite). It has a feature of exporting testcase/suite into different formats like C#, Java, Ruby, Python

5. What Are The Challenges With Selenium Ide?

Selenium-IDE does not directly support: Condition statements Iteration or looping Logging and reporting of test results Error handling, particularly unexpected errors Database testing Test case grouping Re-execution of failed tests Test case dependency Capture screenshots on test failures Results Report generations

47. What Must One Set Within Side In Order To Run A Test From The Beginning To A Certain Point Within The Test?

We need to set a break point in the test, so the test will pause at the break point.

45. How Would One Access The Value Of A Side Variable Named Name From Within A Javascript Snippet Used As The Argument To A Selenese Command?

${variableName}

46. What Distinguishes Between An Absolute And Relative Url In Side?

Absolute URL means the URL starts with http or https. Selenium IDE addes the argument in the open statement and create an absolute URL Relative URL means that in BaseURL, we can put the main domain, and in the open statment, user should put relative URL; For example, if main url is http://mysite.com, in the relative url, we can put http://beta.mysite.com in the open statement.

34. What Is An Accessor In Selenium?

Accessor is one of the type of Selenese. Accessors are used for storing the value of a target in a variable. Ex: storeTitle - Stores the title of a window in a variable storeText - Stores the target element text in a variable Accessors are also used for evaluating the result and storing the result in a variable Ex: storeTextPresent - Evaluates whether the text is present in the current window. If the text is present stores true in the variable else stores false Ex: storeEementPresent - Evaluates whether the element is present in the current window. If the element is present stores true in the variable else stores false

35. When To Use Accessors In Selenium?

Accessors are mostly used for storing the value in a variable. The variable can be used for following reasons: To get the value from an element and comparing with some dynamic value To take a logical decision to execute the test steps ex: if the value of the variable true execute step1 and step2 else step3 and step4 To execute some statements in a loop based on the value returned by the element

36. How To Capture Bitmaps In Selenium?

Bitmaps are captured using the Selenium set of commands. There are two modes of capturing the bitmaps Capture the bitmap for the entire page - it captures the browser main page area of AUT Capture the bitmap for the screen shots - it captures the entire screen shot like the print scree that you give from your keyboard Selenium doesn't support bitmap capturing for an element on AUT.

10. How To Insert A Break Point In Selenium Ide?

Break point can be set in two ways in Selenium IDE Right click on the command in Selenium IDE and select "Toggle Break Point" Select the command in Selenium IDE and press "B" key on the keyboard If you want to clear the break point once again Spress "B" key on the keyboard You can set multiple break points in Selenium IDE

22. What Are The Capabilities Of Selenium Webdriver Or Google Webdriver Or Selenium 2.0?

One should use WebDriver when requiring improved support for Mult-browser testing including improved functionality for browsers not well-supported by Selenium-1.0. Handling multiple frames, multiple browser windows, popups, and alerts. Page navigation. Drag-and-drop. AJAX-based UI elements.

49. Which Browsers Can Selenium Ide Be Run In?

Selenium IDE is firefox ad on, so it runs on Firefox browser.

15. Which Are The Browsers Supported By Selenium Rc?

Supported browsers for Selenium RC include: *firefox *mock *firefoxproxy *pifirefox *chrome *iexploreproxy *iexplore *firefox3 *safariproxy *googlechrome *konqueror *firefox2 *safari *piiexplore *firefoxchrome *opera *iehta *custom

48. What Does A Right-pointing Green Triangle At The Beginning Of A Command In Side Indicate?

That triangle indicates that test paused at that step, or will start from that step.

41. If The Test Case Frame Contains Several Test Cases, How Can One Execute Just The Selected One Of Those Test Cases?

Users can use "Play current test case" function of Selenium IDE

55. Can We Edit Recorded Selenium Ide Test Cases?

Yes, we can edit recorded Test cases, Add Steps, Delete steps, edit steps and Insert comments.

50. What Regular Expression Special Character(s) Means "any Character?"

* symbol means any character

58. What Is The Default Format Of Selenium Ide Test Case?

.html

2. What Are The Technical Challenges With Selenium?

As you know Selenium is a free ware open source testing tool. There are many challenges with Selenium. Selenium Supports only web based applications It doesn't support any non web based (Like Win 32, Java Applet, Java Swing, .Net Client Server etc) applications When you compare selenium with QTP, Silk Test, Test Partner and RFT, there are many challenges in terms of maintainability of the test cases Since Selenium is a freeware tool, there is no direct support if one is in trouble with the support of applications There is no object repository concept in Selenium, so maintainability of the objects is very high There are many challenges if one have to interact with Win 32 windows even when you are working with Web based applications Bitmap comparison is not supported by Selenium Any reporting related capabilities, you need to depend on third party tools You need to learn any one of the native language like (.Net, Java, Perl, Python, PHP, Ruby) to work efficiently with the scripting side of selenium

30. How Do You Add Check Points Or Verification Points In Selenium?

Check points or verification points are known as Assertions in Selenium. The keywords with below mentioned prefix will be used for adding check points or verification points. verify assert waitFor

9. How To Insert A Comment In Selenium Ide?

Comments in Selenium IDE can be set in two ways: Right click on the command in Selenium IDE and select "Inert New Comment" If you want to comment an existing line. You need to follow the below mentioned steps. Select the source tab in IDE Select the line which you want to comment Assume that if you want to comment a open command you need to write like below mentioned code <tr> <!- <td>open&l/td> <td>/node/304/edit&l/td> <td></td> -> </tr>

12. How To Export The Tests From Selenium Ide To Selenium Rc In Different Languages?

From selenium IDE the test cases can be exported into the languages .Net Java Perl Python PHP Ruby The below mentioned steps can explain how to export the test cases: Open the test case from Selenium IDE Select File -> Export Test Case As

13. How To Export Selenium Ide Test Suite To Selenium Rc Suites?

From selenium IDE the test suites can be exported into the languages as mentioned below .Net Java Perl Python PHP Ruby The below mentioned steps can explain how to export the test suites: Open the test case from Selenium IDE Select File -> Export Test Suite As

43. How Can One Get Side To Always Record An Absolute Url For The Open Command's Argument?

In the Selenium IDE options, check "Record Absolute URL" option.

42. What Are Selenium Tests Normally Named (as Displayed At The Top Of Each Test When Viewed From Within A Browser)?

In the browser, the test name in Selenium IDE will be displayed. JUnit Interview Questions

53. How To Export Test Cases From Selenium Ide To Selenium Webdriver?

Open the Test case in Selenium IDE, File menu Save Test suite As Select the language you want to export your test and provide the name to save it.

39. How Do You Set User Extensions In Selenium Ide?

Open user-extensions.js with an editor (Notepad, etc.); it's found in the seleniumcorescripts folder. If it doesn't exist, just create it. If you need to, commit the user-extensions.js file (like if you use subversion). Open Selenium IDE and choose the Options menu and then Options... from that menu. Make sure the path to your user-extensions.js file is entered in the Selenium Core extensions field (like seleniumcorescriptsuser-extensions.js) Press OK button on options Restart the IDE to reflect your extensions. Note: After reopen, Selenium IDE may show compilations errors if the user-extensions.js file has any syntax errors.

27. How To Use Regular Expressions In Selenium?

Regular expressions in Selenium IDE can be used with the keyword - regexp: as a prefix to the value and patterns needs to be included for the expected values. For example if you want to use the regular expression for a command Command: verifyText Target: //font/font/b/font[1] Value: Flight Confirmation # 2011-05-02451 in the above example Flight Confirmation is continuously changing each time you run the test case. So this can be written with a regular expression as mentioned below Command: verifyText Target: //font/font/b/font[1] Value: regexp:Flight Confirmation # [0-9]{4}-[0-9]{2}-[0-9]{5,10}

32. What Are The Types Of Assertions There In Selenium?

Selenium Assertions can be used in 3 modes: assert - When an "assert" fails, the test will be aborted. If you are executing test suite, the next state case will start verify - When a "verify" fails, the test will continue execution, logging the failure. waitFor - "waitFor" commands wait for some condition to become true (which can be useful for testing Ajax applications). They will succeed immediately if the condition is already true. However, they will fail and halt the test if the condition does not become true within the current timeout setting

20. What Is Selenium Grid?

Selenium Grid is part of Selenium suite of projects. Selenium Grid transparently distribute your tests on multiple machines so that you can run your tests in parallel, cutting down the time required for running in-browser test suites. This will dramatically speeds up in-browser web testing, giving you quick and accurate feedback you can rely on to improve your web application.

16. Which Are The Operating Systems Supported By Selenium?

Selenium IDE Works in Firefox 2+ Start browser, run tests Run tests Operating Systems Supported: Windows, OS X Linux Solaris Others whichever supports Firefox 2+ Selenium Remote Control Used for starting browser and run tests Operating Systems Supported: Windows, OS X Linux Solaris Others Selenium Core Used for running tests Operating Systems Supported: Windows, OS X Linux Solaris Others

4. What Are The Capabilities Of Selenium Ide?

Selenium IDE (Integrated Development Environment) works similar to commercial tools like QTP, Silk Test and Test Partner etc. The below mentioned points describes well about Selenium IDE: Selenium IDE is a Firefox add-on. Selenium IDE can support recording the clicks, typing, and other actions to make a test cases. Using Selenium IDE A Tester can play back the test cases in the Firefox browser Selenium IDE supports exporting the test cases and suites to Selenium RC. debugging of the test cases with step-by-step can be done Breakpoint insertion is possible Page abstraction functionality is supported by Selenium IDE Selenium IDE can support an extensibility capability allowing the use of add-ons or user extensions that expand the functionality of Selenium IDE

6. Which Are The Browsers Supported By Selenium Ide?

Selenium IDE supports only one browser Mozilla Firefox. The versions supported as of now are: Mozilla Firefox 2.x Mozilla Firefox 3.x The versions not supported as of now are: earlier versions of Mozilla Firefox 2.x Mozilla Firefox 4.x

3. What Are The Test Types Supported By Selenium?

Selenium could be used for testing the web based applications. The test types can be supported are: Functional, Regression, Load testing The automation tool could be implemented for post release validation with continuous integration tools like: Jenkins, Hudson, Quick Build CruiseCont

1. What Do You Know About Selenium?

Selenium is a suite of tools for web automation testing. Selenium first came to life in 2004 when Jason Huggins was testing an internal application at Thought Works. Selenium was a tremendous tool, it wasn't without its drawbacks. Because of its JavaScript based automation engine and the security limitations browsers apply to JavaScript, different things became impossible to do. Selenium Suite of projects includes: Selenium IDE Selenium Core Selenium 1 (known as Selenium RC or Remote Control) Selenium 2 (known as Selenium Web driver) Selenium-Grid

28. What Are The Regular Expression Patterns Available In Selenium?

Selenium regular expression patterns offer the same wide array of special characters that exist in JavaScript. Below are a subset of those special characters: .: any single character [ ]character class: any single character that appears inside the brackets *quantifier: 0 or more of the preceding character (or group) +quantifier: 1 or more of the preceding character (or group) ?quantifier: 0 or 1 of the preceding character (or group) {1,5}quantifier: 1 through 5 of the preceding character (or group) |alternation: the character/group on the left or the character/group on the right ( )grouping: often used with alternation and/or quantifier

29. What Is Selenese?

Selenium set of commands which are used for running the test are called as Selenese. There are three types of Selenese, those are: Actions - used for performing the operations and interactions with the target elements Assertions - used as check points Accessors - used for storing the values in a variable

24. Does Selenium Support Mobile Internet Testing?

Selenium supports Opera. And opera is used in most of the Smart phones. So whichever Smart phone supports opera, selenium can be used to test. So, one can use Selenium RC to run the tests on mobiles.

18. Why Selenium Rc Is Used?

Selenium-IDE does not directly support: condition statements iteration logging and reporting of test results error handling, particularly unexpected errors database testing test case grouping re-execution of failed tests test case dependency capture screenshots on test failures The reason behind why Selenium-IDE does not support the above mentioned requirements is IDE supports only HTML language. Using HTML language we cannot achieve the above mentioned requirements. Because HTML does not support conditional, looping and external source connectives. To overcome the above mentioned problems Selenium RC is used. Since Selenium RC supports the languages .Net, Java, Perl, Python, PHP, and Ruby. In these languages we can write the programme to achieve the IDE issues

17. What Is Selenium Rc?

Selenium-RC is the solution for tests that need a little more than just simple browser actions and a linear execution. Selenium-RC leverages the full power of programming languages, creating tests that can do things like read and write external files, make queries to a database, send emails with test reports, and practically anything else a user can do with a normal application. You will want to use Selenium-RC whenever your test requires logic not supported by running a script from Selenium-IDE

7. How To Execute A Single Line Command From Selenium Ide?

Single line command from Selenium IDE can be executed in two ways: Right click on the command in Selenium IDE and select "Execute This Command" Select the command in Selenium IDE and press "X" key on the keyboard

8. How To Insert A Start Point In Selenium Ide?

Start point Selenium IDE can be set in two ways: Right click on the command in Selenium IDE and select "Set / Clear Start Point" Select the command in Selenium IDE and press "S" key on the keyboard You can have only one start point If you have already set one start point and you selected other command as start point. Then the first start point will be removed and the new start point will be set

52. How To Install Selenium Ide?

Steps to Download and Install Selenium IDE: Launch Firefox browser, download selenium IDE from the Seleniumhq.org website. Firefox will protect you from installing add ons from unfamiliar locations, so we will need to click "Allow" to proceed with the installation. Install multiple items to support Java, Ruby, Python etc... formats. Restart Firefox browser. After Firefox reboots then we can use Selenium IDE.

23. What Is The Architecture Of Selenium Rc?

The Selenium Server which launches and kills browsers, and acts as an HTTP proxy for browser requests. Client libraries for various programming languages, each of which instructs the Selenium Server in how to test the AUT by passing it your test script's Selenium commands. The diagram shows the client libraries communicate with the Server passing each Selenium command for execution. Then the server passes the Selenium command to the browser using Selenium-Core JavaScript commands. The browser, using its JavaScript interpreter, executes the Selenium command, which effectively, runs the check you specified in your Selenese test script.

14. Which Is The Command Used For Displaying The Values Of A Variable Into The Output Console Or Log?

The command used for displaying the values of a variable into the output console or log - echo If you want to display a constant string. The below mentioned command can be used echo <constant string> ex: echo "The sample message" If you want to display the value of a variable it can be written like below echo ${<variable name>> ex: echo ${var1} Note: Here var1 is the variable

19. Which Are The Languages Supported By Selenium Rc?

The languages supported by Selenium RC: .Net, Java (Junt 3, Junt 4, TestNG, Groovy) Perl, Python, PHP, Ruby

40. What Are The Limitations Of Selenium Ide?

The limitations of Selenium IDE are: Selenium IDE uses only HTML language Conditional or branching statements execution like using of if, select statements is not possible Looping statements using is not possible directly in Selenium HTML language in ide Reading from external files like .txt, .xls is not possible Reading from the external databases is not possible with ide Exceptional handling is not there A neat formatted Reporting is not possible with ide To eliminate the above issues we use Selenium RC

26. What Are The Types Of Text Patterns Available In Selenium?

There are three types of patterns available in Selenium: globbing regular expressions exact

11. How To Debug The Tests In Selenium Ide?

To debug or execute the test cases line by line. Follow the below mentioned steps: Insert a break From the location where you want to execute step by step Run the test case Execution will be paused at the given break point Click on the step (Blue) button to continue with the next statement Click on Run button, to continue executing all the commands at a time

44. What Selenese Command And Argument Can Be Used To Transfer The Value Of A Javascript Variable Into A Side Variable?

Use "store" command

56. How To Execute Selenium Test Case Step By Step?

Using Breakpoints and Step command we can execute Selenium Test case step by step.

59. How To Create Test Cases Using Selenium Ide?

Using Recording feature we can generate Test cases otherwise we can type Test steps using Element locators and Selenese commands.

21. What Is Selenium Webdriver Or Google Webdriver Or Selenium 2.0?

WebDriver uses a different underlying framework from Selenium's javascript Selenium-Core. It also provides an alternative API with functionality not supported in Selenium-RC. WebDriver does not depend on a javascript core embedded within the browser, therefore it is able to avoid some long-running Selenium limitations. WebDriver's goal is to provide an API that establishes: A well-designed standard programming interface for web-app testing. Improved consistency between browsers. Additional functionality addressing testing problems not well-supported in Selenium 1.0. The Selenium developers strive to continuously improve Selenium. Integrating WebDriver is another step in that process. The developers of Selenium and of WebDriver felt they could make significant gains for the Open Source test automation community be combining forces and merging their ideas and technologies. Integrating WebDriver into Selenium is the current result of those efforts.

57. What Is The Difference Between "assert" And "verify" Commands?

When an "assert" command fails then test execution will be aborted. When a "verify" command fails then test will continue execution and logging the failure.

25. Does Selenium Support Google Android Operating System?

Yes, Selenium Web Driver or Google Web Driver or Selenium 2.0 supports Android Operating System. There are several libraries written to support Android Operating System.

33. When To Use Assert, Verify And Waitfor In Selenium?

assert - If the expected value is mandatory to continue with the next set of steps we will use Assert. As Assert aborts the test, if the expected value doesn't match. It is good to use for any mandatory checks. verify - If the expected value is optional to continue with the next set of steps we will use Verify. As Verify continues executing with the next set of steps, if the expected value doesn't match. It is good to use for any optional checks. waitFor - If your test needs to wait, if the expected value is not matching we use waitFor. We normally use waitFor for AJAX kind of controls loading within a page

38. What Is The Difference Between Captureentirepagescreenshot And Capturescreenshot?

captureEntirePageScreenshot : This captures the AUT web page only This supports only mozilla firefox Accepts two arguments. one is the file name to be saved and other argument is back ground color CaptureScreenShot : This captures the System screen shot This supports all the browsers when you run from Selenium RC Accepts one argument. That is the file name to be saved.

37. Which Are The Commands Used For Capturing The Bitmaps?

captureEntirePageScreenshot : Saves the entire contents of the current window canvas to a PNG file. Contrast this with the captureScreenshot command, which captures the contents of the OS viewport (i.e. whatever is currently being displayed on the monitor), and is implemented in the RC only. Currently this only works in Firefox when running in chrome mode, and in IE non-HTA using the EXPERIMENTAL "Snapsie" utility. The Firefox implementation is mostly borrowed from the Screengrab! Firefox extension. captureEntirePageScreenshotAndWait : Saves the entire contents of the current window canvas to a PNG file. Contrast this with the captureScreenshot command, which captures the contents of the OS viewport (i.e. whatever is currently being displayed on the monitor), and is implemented in the RC only. Currently this only works in Firefox when running in chrome mode, and in IE non-HTA using the EXPERIMENTAL "Snapsie" utility. The Firefox implementation is mostly borrowed from the Screengrab! Firefox extension. Note: This command runs with only mozilla firefox when you run the tests from RC. Other browsers it will not support


Kaugnay na mga set ng pag-aaral

BSHM-1 [1st sem] midterms - Human Behavior in Organizations

View Set

CHAPTER 9: Cellular Respiration & Fermentation

View Set

Chapter 11 (11.1, 11.2), Gaddis, Starting... Java, 6th edition

View Set