My favorites | Sign in
Project Logo
                
Search
for
Updated Jul 03, 2008 by saidesertrose2004
Labels: Featured, Phase-Deploy, Phase-Support
UserGuide  

#User guide for schnell

Introduction

This may be a non detailed user guide for schnell. I will strive to make it better as the days follow.

The installation and setup instructions are available in Installation page of the wiki.

Typical usage of schnell

   # include the controller 
   require 'schnell' 
   include Schnell
   # create an instance of the controller 
   browser = Browser.new 
   # set the proxy server if you have one
   browser.set_proxy(proxy_host,proxy_port)   
   # go to the page you want to test 
   browser.goto('http://testserver/') 
   # to enter text into a text field - assuming the field is named 'username' 
   browser.text_field(:name, 'username').set('Matz') 
   # set text field that has an id of 'company_ID' to 'Ruby Conf' 
   browser.text_field(:id ,'company_ID').set('Ruby Conf') 
   # to click a button that has a caption of 'Cancel' 
   browser.button(:value, 'Cancel').click 

There are different ways to locate objects in schnell but id and name are the most reliable ones to use as they change least often in an application.

The following table shows the supported elements and the properties which can be used to identify them

Element Identifiers
Button (Including Image and Submit types) name, id, value, index
TextField (Including TextInput and Password types) name, id, value, index, beforeText, afterText
Radio name, id, value, index
CheckBox name, id, value, index
Link id, url, href, name, title, text, index
Image name, id, src, alt, title, index

The elements and identifiers supported now are a bit limited. But support for more are on the way :). Your contribution is also welcomed.


Sign in to add a comment
Hosted by Google Code