Difference between revisions of "Example Selenium test suite"
From Organic Design wiki
m |
(use fullurl and FULLPAGENAMEE in links) |
||
| Line 1: | Line 1: | ||
| − | |||
{{Info| [[Special:Selenium]] provides a drop down menu to select and run these selenium tests as a selenium suite using selenium-core}} | {{Info| [[Special:Selenium]] provides a drop down menu to select and run these selenium tests as a selenium suite using selenium-core}} | ||
;Suite | ;Suite | ||
| − | *[{{ | + | *[{{fullurl:Special:Selenium|suite={{FULLPAGENAMEE}}}} Suite generation] |
| + | |||
;Tests | ;Tests | ||
| − | *[{{ | + | *[{{fullurl:Special:Selenium|suite={{FULLPAGENAMEE}}}}&test=Create_account Create account] |
| − | *[{{ | + | *[{{fullurl:Special:Selenium|suite={{FULLPAGENAMEE}}}}&test=Login Login] |
| − | *[{{ | + | *[{{fullurl:Special:Selenium|suite={{FULLPAGENAMEE}}}}&test=Edit_an_article Edit an article] |
| − | *[{{ | + | *[{{fullurl:Special:Selenium|suite={{FULLPAGENAMEE}}}}&test=Edit_a_section Edit a section] |
| − | *[{{ | + | *[{{fullurl:Special:Selenium|suite={{FULLPAGENAMEE}}}}&test=Logout Logout] |
| − | ==Create account== | + | == Create account == |
This test is an example of transclusion of another article ([[Example Selenium test]]) which itself a test article encapsulated in selenium tags. | This test is an example of transclusion of another article ([[Example Selenium test]]) which itself a test article encapsulated in selenium tags. | ||
{{:Example Selenium test}} | {{:Example Selenium test}} | ||
| − | ==Login== | + | == Login == |
| − | + | This test is an example of an inline <nowiki><selenium></nowiki> test. | |
<selenium> | <selenium> | ||
<html> | <html> | ||
| Line 70: | Line 70: | ||
</selenium> | </selenium> | ||
| − | ==Edit an article== | + | == Edit an article == |
<selenium> | <selenium> | ||
<html> | <html> | ||
| Line 127: | Line 127: | ||
</selenium> | </selenium> | ||
| − | ==Edit a section== | + | == Edit a section == |
<selenium> | <selenium> | ||
<html> | <html> | ||
| Line 190: | Line 190: | ||
</html> | </html> | ||
</selenium> | </selenium> | ||
| − | ==Logout== | + | |
| + | == Logout == | ||
<selenium> | <selenium> | ||
<html> | <html> | ||
Revision as of 05:55, 1 August 2008
- Suite
- Tests
Create account
This test is an example of transclusion of another article (Example Selenium test) 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 | /wiki/index.php?title=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 | /wiki/index.php?title=User_talk:Foo | |
| clickAndWait | link=+ | |
| type | wpSummary | foo |
| type | wpTextbox1 | bar |
| clickAndWait | wpSave | |
| clickAndWait | link=edit | |
| verifyTitle | Editing*(section)* | |
</selenium>
Logout
<selenium>
| Logout | ||
| open | /wiki/index.php?title=Main_page | |
| clickAndWait | link=Log out | |
| verifyHtmlSource | glob:*You are now logged out.* | |
</selenium>



