Home arrow Ruby-on-Rails arrow Page 4 - Acceptance Testing
RUBY-ON-RAILS

Acceptance Testing


If you've built a complicated application and you want to make sure it works, you perform acceptance testing. This three-part article series will show you how to automate the process. It is excerpted from chapter 11 of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).

Author Info:
By: Apress Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
July 23, 2010
TABLE OF CONTENTS:
  1. · Acceptance Testing
  2. · Installing Selenium
  3. · Writing Selenium Tests
  4. · Action Commands

print this article
SEARCH DEVARTICLES

Acceptance Testing - Action Commands
(Page 4 of 4 )

Actions perform user actions that modify the state of the application, including clicking links and submitting forms; even drag and drop is supported. So, actions can be used to mimic almost any action performed in a browser by George or any of Emporium's customers. Table 11-1 lists some of the available action commands.

Table 11-1. Some Selenium Actions 

 

Name

Description

open(url)

Accesses a page, such as the forum1

click(locator)

Simulates a user clicking a link, button, check box, or radio button2

type(locator, value)

Simulates a user typing some text into a text box or any other form field that accepts user input

select(locator, value)

Selects a specific item from a drop-down list

 

1 The URL must point to the same domain where the Selenium script has been deployed. For example, you can't test www.google.com. This is due to the so-called same origin policy enforced by browsers. This limitation can be circumvented by using a proxy.

2 Use clickAndWait(locator) if the action causes a new page to load (as most do).

Please check back next week for the continuation of this article.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
RUBY-ON-RAILS ARTICLES

- Ruby-on-Rails Faces Second Security Flaw in ...
- Ruby 2.0 Prepped for February 2013 Release
- Why LinkedIn Switched from Ruby on Rails
- Adding Style with Action Pack
- Handling HTML in Templates with Action Pack
- Filters, Controllers and Helpers in Action P...
- Action Pack and Controller Filters
- Action Pack Categories and Events
- Logging Out, Events and Templates with Actio...
- Action Pack Sessions and Architecture
- More on Action Pack Partial Templates
- Action Pack Partial Templates
- Displaying Error Messages with the Action Pa...
- Action Pack Request Parameters
- Creating an Action Pack Registration Form

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials