Skip to main content

Introduction To Selenium IDE | Selenium Training Institutes Hyderabad







Selenium Training Institutes Hyderabad
Selenium Training Institutes Hyderabad


Selenium IDE is the simplest of the tools in the Selenium suite. The quickest way to get started with creating scripts. But it only supports record and playback within Firefox. For automating other browsers use one of the more advanced Selenium tools. Such as Selenium RC or Selenium 2.0 but let’s not get ahead of ourselves! First, let’s install Selenium IDE, which is an add-on for Firefox.


 To allow Firefox to start the installation process. Once it’s installed, prompted to restart Firefox.


 Firefox restarted Selenium IDE installed and available in the Tools menu. You can also open Selenium IDE in a sidebar by selecting View Selenium IDE. The functionality is the same regardless of the way launched.


There are quite a few things here but we only need to understand record and playback a simple script.


In fact, let’s record some commands before we even explain the interface. Move the Selenium IDE window to one side so that you have both Firefox and the IDE on screen at the same time. What is QA link on the right ‘Getting Started’. The page has loaded, take a look at Selenium IDE has done. Its recorded actions because by default Selenium IDE is recording launch it. The ‘Play current test case’ icon and watch Firefox replay actions.


So what did having the record mode on do for us? Well, first it filled in the ‘Base URL’, which is the domain name of the website that you want to create a script for. This separate from the rest of the script. Useful two very similar sites testing.


Two commands also appeared in our script. The first command was 'open' and the location opened was '/'. The second command was ‘clickAndWait’. This is appropriate because clicked on a link, and to wait for the resulting page to load. The Target and Value columns. We’ll look at those in more details later in the series.


The script is pretty good, but it’s not a test until we have some checks. In Selenium IDE can assert things and verify things. The difference is quite simple. If the assert fails then the script will stop running at that point. The failure will be logged but the script will continue. A common use asserts the titles of the page is correct and verify items on the page.


In Firefox, you should still have the ‘What is QA?’ page open. Right-click anywhere on the page, and you should see a context menu popup like the one on the left.


Highlight the ‘Show All Available Commands’ item and another menu should appear. QMO – quality mozilla.org and select it. A new command appears inSelenium IDE add a verify command to check the page content.


In Firefox, click and drag over the heading highlight. Then right-click and select the item verifyTextPresent. If click ‘Play current test case’ inSelenium IDE the script will run again.


Now our script is much better, but there’s still something that concerns me. The last command is only checked appears somewhere on the page. This text actually appears twice on the page in the heading. The heading the location of the current page shown. The heading changed our test would still pass, and a genuine bug.


A better command to use here is ‘verify Text’ location of the text want to check. It also gives a much more useful message. This time select verify Text. The bit in the middle is the locators explain in more detail later in this series. Delete the verifyTextPresent command delete key on keyboard run the test again.


 The ‘assertTitle’ has not gone green or red. This is because an assert failed result, the script stopped running. The details of the failure in the Log section at the bottom of the window. It says that the actual value does not match the expected value. It provides both values so that you can see why the check failed.

Comments

Popular posts from this blog

AutoIt in Selenium Webdriver

    AutoIt in Selenium Web driver Selenium is an open source tool. That designed to automate web-based applications on different browsers. But to handle window GUI and non-HTML popups in the application. AutoIt required as these window based activity are not handled by Selenium . What is AutoIt? AutoIt v3 is a freeware scripting language designed for automating. the Windows GUI and general scripting. the combination of keystrokes, mouse movement and window/control manipulation to automate tasks. It is way not possible or reliable with other languages. AutoIt is very small, self-contained and run on all versions of Windows. The face with no annoying “runtimes” required. In layman’s term, AutoIt is another automation tool. Selenium used for Desktop Automation rather Web Automation. It is a powerful tool. It does not automate desktop windows, button & for. it automates mouse movements & keystrokes too. Selenium IDE recording capability generat...

Jenkins used in maven

  What is Jenkins? The Jenkins is the most important open source continuous process of the combine with another tool. It is cross-platform and it can be used on Windows, Linux, Mac and Solaris environments. It is composed in Java. Jenkins most important usage to check the progress any job which can be any application state.  It stimulates preconfigured actions when an individual step occurs in tasks. The Jenkins allows us to take 1 more step further, and allow us to automate this execution of test cases. A little more work, you can configure such that your tests execute every time after deploys a new build. Checks in code Jenkins build a execute unit tests, now deploys the application to test environment. Jenkins builds and then executes your tests on the newly deployed application. This is essential the CI process that others have mentioned. At this point, the only thing that you need to real worry is the writing of your test automa...