Difference between revisions of "Example Selenium test suite"
From Organic Design wiki
(→Login) |
m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{legacy}} | ||
+ | |||
== Links to the suite & individual tests == | == 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 [[Special:Selenium|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]]. | 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 [[Special:Selenium|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]]. | ||
Line 27: | Line 29: | ||
<tr> | <tr> | ||
<td>open</td> | <td>open</td> | ||
− | <td> | + | <td>{{localurl:Special:Userlogout}}</td> |
<td></td> | <td></td> | ||
Line 82: | Line 84: | ||
<td>open</td> | <td>open</td> | ||
− | <td> | + | <td>{{localurl:TestArticle}}</td> |
<td></td> | <td></td> | ||
</tr> | </tr> | ||
Line 139: | Line 141: | ||
<td>open</td> | <td>open</td> | ||
− | <td> | + | <td>{{localurl:User talk:Foo}}</td> |
<td></td> | <td></td> | ||
</tr> | </tr> | ||
Line 203: | Line 205: | ||
<td>open</td> | <td>open</td> | ||
− | <td> | + | <td>{{localurl:Main Page}}</td> |
<td></td> | <td></td> | ||
</tr> | </tr> |
Latest revision as of 14:24, 22 October 2014
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. <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 | {{localurl: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 | {{localurl: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 | {{localurl:User talk:Foo}} | |
clickAndWait | link=+ | |
type | wpSummary | foo |
type | wpTextbox1 | bar |
clickAndWait | wpSave | |
clickAndWait | link=edit | |
verifyTitle | Editing*(section)* |
</selenium>
Logout
<selenium>
Logout | ||
open | {{localurl:Main Page}} | |
clickAndWait | link=Log out | |
verifyHtmlSource | glob:*You are now logged out.* |
</selenium>