Personal tools
Make a donation
$ 




Example Selenium test suite

From OrganicDesign Wiki

Jump to: navigation, search

Contents

Links to the suite & individual tests

Links to the test and suites can be created as they have in this section, but the easiest way to select and run tests is from the Selenium special page. For the test suite article to be available from the select list in the special page, it must be categorised into Category:Selenium.

Create account

This test is an example of transclusion of another article (Example Selenium test) which itself a test article encapsulated in selenium tags.

Create Account
open /Special:Userlogout
open /Main_Page
clickAndWait link=Log in / create account
clickAndWait link=Create an account
storeEval new Date().getTime()-1000000000000 username
type wpName2 ${username}
type wpPassword2 password
type wpRetype password
clickAndWait wpCreateaccount
verifyTitle glob:*successful*

Login

This test is an example of an inline <selenium> test.

Login
open /Special:Userlogout
clickAndWait link=Log in / create account
type wpName1 Foo
type wpPassword1 bar
clickAndWait wpLoginattempt
verifyTitle glob:*successful*

Edit an article

Edit an article
open /TestArticle
clickAndWait link=Edit
storeEval new Date().getTime()-1000000000000 content
type wpTextbox1 *Test: ${content} ~~~~
clickAndWait wpSave
verifyHtmlSource regex:
  • Test: ${content}
  • Edit a section

    Edit a section
    open /User_talk:Foo
    clickAndWait link=+
    type wpSummary foo
    type wpTextbox1 bar
    clickAndWait wpSave
    clickAndWait link=edit
    verifyTitle Editing*(section)*

    Logout

    Logout
    open /Main_Page
    clickAndWait link=Log out
    verifyHtmlSource glob:*You are now logged out.*

    The GNU Project Debian Linux Ubuntu Linux Wikipedia Affiliate Button MediaWiki

    Content under the www.organicdesign.co.nz domain is available under the Creative Commons Attribution-ShareAlike License