|
UserGuide
#User guide for schnell IntroductionThis 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
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