[2028] | 1 | This command is used to create test case files for Selenium firefox plugin according to the "sequences" created from command "parseDirHTML".
|
---|
| 2 | Before using this command, please run command "parseDirHTML" first.
|
---|
| 3 |
|
---|
| 4 | Selenium test cases have a xhtml file template as following:
|
---|
| 5 | ----------------------------------------------------------------------
|
---|
| 6 | <?xml version="1.0" encoding="${encoding}"?>
|
---|
| 7 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
---|
| 8 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
---|
| 9 | <head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
---|
| 10 | <meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />
|
---|
| 11 | <link rel="selenium.base" href="${baseURL}" />
|
---|
| 12 | <title>${name}</title>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 | <table cellpadding="1" cellspacing="1" border="1">
|
---|
| 16 | <thead>
|
---|
| 17 | <tr><td rowspan="1" colspan="3">${name}</td></tr>
|
---|
| 18 | </thead><tbody>
|
---|
| 19 | <tr>
|
---|
| 20 | <td>${command}</td>
|
---|
| 21 | <td>${target}</td>
|
---|
| 22 | <td>${value}</td>
|
---|
| 23 | </tr>
|
---|
| 24 | </tbody></table>
|
---|
| 25 | </body>
|
---|
| 26 | </html>
|
---|
| 27 | ----------------------------------------------------------------------
|
---|
| 28 |
|
---|
| 29 | This template needs three basic parameters:
|
---|
| 30 | $encoding: encoding style, e.g. UTF-8
|
---|
| 31 | $baseURL: home page
|
---|
| 32 | $name: test case name
|
---|
| 33 | and three parameters for each event:
|
---|
| 34 | ${command}
|
---|
| 35 | ${target}
|
---|
| 36 | ${value}
|
---|
| 37 | Commands are got from the "Event Type".
|
---|
| 38 | Targets are got from the "Event Target" in terms of xPath.
|
---|
| 39 | Values is got from the "Event Type".
|
---|
| 40 |
|
---|
| 41 | "Event Type" and "Event Target" are two attributes of events in sequences created from parseDirHTML.
|
---|
| 42 |
|
---|
| 43 | Usage:
|
---|
| 44 | generateSeleniumReplay [sequenceName] <HTMLFilesFolder> <websiteBaseURL>
|
---|
| 45 | sequenceName: optional. The name of sequences created from command "parseDirHTML". It should be the same as the sequences name specified in command "parseDirHTML".
|
---|
| 46 | Default: sequences, which is the same as the default value of command "parseDirHTML"
|
---|
| 47 | HTMLFilesFolder: required. The target folder to store created xhtml files, should be a already created folder.
|
---|
| 48 | websiteBaseURL: required. The homepage URL of the target website.
|
---|
| 49 |
|
---|
| 50 |
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 |
|
---|