Difference between revisions of "Example Selenium test suite"
From Organic Design wiki
(Long form urls) |
(Syncing example to local wiki) |
||
| Line 2: | Line 2: | ||
;See also | ;See also | ||
| − | *[[Special:Selenium]] | + | *[{{SERVER}}/wiki/extensions/Selenium/selenium-core-0/core/TestRunner.html Selenium test environment] |
| + | *[{{SERVER}}/wiki/extensions/Selenium/selenium-core-0/core/TestRunner.html?test=..%2F..%2F..%2F..%2Findex.php%3Ftitle%3DSpecial%3ASelenium%26suite%3DSelenium_example&resultsUrl=..%2FpostResultss Selenium example] | ||
| + | *[[Special:Selenium|Selenium special page]] | ||
;Suite | ;Suite | ||
*[{{SERVER}}/wiki/index.php?title=Special:Selenium&suite=Selenium_example Suite generation] | *[{{SERVER}}/wiki/index.php?title=Special:Selenium&suite=Selenium_example Suite generation] | ||
| Line 13: | Line 15: | ||
==Create account== | ==Create account== | ||
| − | This test is an example of transclusion of another article which itself a test article encapsulated in selenium tags. | + | This test is an example of transclusion of another article ([[Test:Create account]]) which itself a test article encapsulated in selenium tags. |
{{:Test:Create account}} | {{:Test:Create account}} | ||
Revision as of 03:44, 27 December 2007
- See also
- Suite
- Tests
Create account
This test is an example of transclusion of another article (Test:Create account) which itself a test article encapsulated in selenium tags. <selenium>
| Create Account | ||
| open | {{localurl:Special:Userlogout}} | |
| open | {{localurl: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* | |
</selenium>
Login
this test is an example of an inline <selenium> test. <selenium>
| Login | ||
| open | /wiki/index.php?title=Special:Userlogout | |
| clickAndWait | link=Log in / create account | |
| type | wpName1 | foo |
| type | wpPassword1 | bar |
| clickAndWait | wpLoginattempt | |
| verifyTitle | glob:*successful* | |
</selenium>
Edit an article
<selenium>
| Edit an article | ||
| open | /TestArticle | |
| clickAndWait | link=Edit | |
| storeEval | new Date().getTime()-1000000000000 | content |
| type | wpTextbox1 | *Test: ${content} ~~~~ |
| clickAndWait | wpSave | |
| verifyHtmlSource | regex: |
|
</selenium>
Edit a section
<selenium>
| Edit a section | ||
| open | /User_talk:Foo | |
| clickAndWait | link=+ | |
| type | wpSummary | foo |
| type | wpTextbox1 | bar |
| clickAndWait | wpSave | |
| clickAndWait | link=edit | |
| verifyTitle | Editing*(section)* | |
</selenium>
Logout
<selenium>
| Logout | ||
| open | / | |
| clickAndWait | link=Log out | |
| verifyHtmlSource | glob:*You are now logged out.* | |
</selenium>



