Showing posts with label Selenium-IDE. Show all posts
Showing posts with label Selenium-IDE. Show all posts

Thursday, May 30, 2013

Locating Elements in Selenium

Attributes for elements:

  name
  id
  href
  title
  value
  class




Locating Elements in Selenium

Examples of Elements on Html page:

  Input
  button
  form
  span
  ol
  ul
  a

Locating Elements in Selenium

Some Objects on web page:

  checkbox
  radio button
  link
  dropdown
  text field
  text area
  button

Identify the elements using IE Developer tools

Install  Developer tool

The Internet Explorer Developer Toolbar provides several features for exploring and
understanding Web pages. These features enable you to:
Locate and select specific elements on a Web page through a variety of techniques
View HTML object class names, ID's, and details such as link paths.

How to Install:



Go to below link
http://www.microsoft.com/download/en/details.aspx?id=18359

How to identify elements in Selenium: Firebug

 Firebug:

Firebug is an Add-on for FireFox.
To Install Firebug Open  http://getfirebug.com/ in FireFox.



Click on Install Firebug



and complete the full process of installation.

after that..


Get a message “Restart Firefox to complete your changes.” Click on “Restart
Firefox”
After Restarting the browser, open www.google.com,
Right click on any element, we will get Inspect Element option.

Tuesday, May 28, 2013

How to identify the elements in Selenium

LOCATORS
Tools to identify elements/objects

There are some tools to identify the elements

  Firebug
  IE DebugBar
  Google Chrome Developer Tools


Firebug: Firebug mostly used by web developers, as it allows developers to find
elements on the page by using the find functionality.

IE DebugBar: This is an add-on for IE. It also has many features like Firebug.

Google Chrome Developer Tools: This is not like IE or Firefox Google chrome
developer tools is built-in to the browser and will also allow you to find the
elements on the page and be able to work out its XPath.

Recording your first test with Selenium-IDE



Steps:
1.  Open URL www.google.com
2.  Type “expertinqtp.blogspot.com” in search box
3.  Click on search button
4.  Click on first link in search results

Thursday, May 23, 2013

Selenium IDE Icon

Selenium IDE Icon.












Base URL—This is the URL that the test will start. All open commands
will be relative to the Base URL unless a full path is inserted in the open
command.
  Speed Slider—This is the slider under the Fast Slow labels
on the screen.
  —Run all the tests in the IDE.
  —Run a single test in the IDE.
  —Pause a test that is currently running.
  —Step through the test once it has paused. 



The Selenese Command select box has a list of all the commands that are
needed to create a test. You can type into it to use the auto complete
functionality or use it as a dropdown.
  Target textbox allows you to input the location of the element that you want
to work against.
  The Find button, once the target box is populated, can be clicked on to
highlight the element on the page.
  Value textbox is where you place the value that needs to change. For
example, if you want your test to type in an input box on the web page, you
would put what you want it to type in the value box.
  The Test table will keep track of all of your commands, targets, and values.
It has been structured this way because the original version of Selenium was
styled on FIT tests. The tests were originally designed to be run from HTML
files and the IDE keeps this idea for its tests. If you click on the Source tab,
you will be able to see the HTML that will store the test. Each of the rows will
look like:
o  <tr>
o  <td>open</td>
o  <td>/chapter1</td>
o  <td></td>
o  </tr>
  The area below the Value textbox will show the Selenium log while the tests
are running. If an item fails, then it will have an [error] entry. This area will
also show help on Selenium commands when you are working in the
Command select box. This can be extremely useful when typing commands
into the Selenium IDE instead of using the record feature

Wednesday, May 22, 2013

How to install Selenium IDE?

Pre Requisites:
  Mozilla Firefox

Installation:

  Go to http://seleniumhq.org/download/.
  Click on the download link for Selenium IDE. You may get a message saying Firefox prevented
this site (seleniumhq.org) from asking you to install software on your computer.
  Please click on the Allow button.
  A pop up will appear.
  Install button will become active and then click on it.
  This will now install the Selenium IDE as a Firefox add-on.
  Once the installation process is complete, it will ask you to restart Firefox.
  Click on the Restart button. Firefox will close and then reopen.
  Once the installation is complete, the Add-ons window will show the Selenium IDE and its
current version.
Start Selenium IDE:
1.  Open a new Firefox browser
2.  Click on tools
3.  Click on Selenium IDE

Selenium-IDE

  Selenium-IDE is the Integrated Development Environment for building Selenium test cases.

  It is Firefox add-on and provides an easy-to-use interface for developing and running individual
test cases or entire test suites.

  Selenium-IDE has a recording feature, which will keep account of user actions as they are
performed and store them as a reusable script to play back.

  It also has a context menu (right-click) integrated with the Firefox browser, which allows the
user to pick from a list of assertions and verifications for the selected location.

  Selenium-IDE also offers full editing of test cases for more precision and control.

  Although Selenium-IDE is a Firefox add-on, tests created in it can also be run against other
browsers by using Selenium-RC and specifying the name of the test suite on the command line