| 13 | | === Version history === |
| 14 | | |
| 15 | | * [http://charpi.net/cgi-bin/download.cgi?file=selenium_r83.tgz r83] |
| 16 | | * Changes |
| 17 | | * New package name based on repository revision number. |
| 18 | | * Build system is switched to rake. |
| 19 | | * Support for selenium-server 1.0 (jar file is provided) |
| 20 | | * OTP R12 and OTP R13 support. |
| 21 | | |
| 22 | | {{{ |
| 23 | | To compile with OTP R11 you'll have to remove -spec directive from the source files. |
| 24 | | }}} |
| 25 | | * Known limitations /bugs |
| 26 | | * The test 'keypress' doesn't work with safari. Don't know where the problem is. |
| 27 | | |
| 28 | | * [http://charpi.net/cgi-bin/download.cgi?file=selenium_src-20080913.tgz 20080913] |
| 29 | | * Changes |
| 30 | | * selenium_api and selenium_session now export function with 'erlang style' name. Compatibility with 20080907 is broken. |
| 31 | | * Bug Fix |
| 32 | | * R12 specific APIs introduced with 20080907 are removed |
| 33 | | * [http://charpi.net/cgi-bin/download.cgi?file=selenium_src-20080907.tgz 20080907] |
| 34 | | * Changes |
| 35 | | * Commands are sent using POST requests. |
| 36 | | * UTF8 support |
| 37 | | * Support commands which return arrays. (use selenium:cmd_array/4) |
| 38 | | * New module selenium_api which exports all selenium commands see Usages |
| 39 | | * New module selenium_session which reduces the duplication of 'Session' writing tests |
| 40 | | * Api doc generation $TOP/lib/selenium_remote/doc/selenium_api.html |
| 41 | | * Known problems |
| 42 | | * Don't compile with OTP R11 due to the use of string:join/2. This will be solve in newer version |
| 43 | | * Modules selenium_api and selenium_session exports function with camelCase names (just as in Java). In next version, exports will have erlang style name, so compatibility will be broken if you use those modules |
| 44 | | * [http://charpi.net/cgi-bin/download.cgi?file=selenium_src-20080829.tgz 20080829] |
| 45 | | * Changes |
| 46 | | * OTP R12 support |
| 47 | | * Support Selenium server 1.0-beta |
| 48 | | * Include Selenium server 1.0-beta |
| 49 | | * Limitations |
| 50 | | * Commas in result string aren't correctly interpreted. |
| 51 | | * Only support 'GET' requests so you can reach the max length of an URI if you are typing long texts. |
| 52 | | * [http://charpi.net/cgi-bin/download.cgi?file=selenium_src.tgz 20080622] |
| 53 | | * Repackaging of the 'really first version' |
| 54 | | * OTP R11 support |
| 55 | | * Include Selenium server 0.92 |
| 56 | | |
| 57 | | === Installation === |
| 58 | | |
| 59 | | * Download the archive file. |
| 60 | | * Unzip it |
| 61 | | * cd <dir> |
| 62 | | * Edit erlang_config.rb and update the configuration |
| 63 | | * Launch rake |
| 64 | | |
| 65 | | To see how tests run: |
| 66 | | * rake start_server |
| 67 | | * rake test |
| 68 | | * rake stop_server |
| 69 | | |
| 70 | | === Usage === |
| 71 | | ==== Simple ==== |
| 72 | | {{{ |
| 73 | | #!python |
| 74 | | test () -> |
| 75 | | Session = selenium :start (?HOST,?PORT, ?BROWSER, ?URL), |
| 76 | | Start_url = "http://charpi.net", |
| 77 | | selenium: cmd (Session, open, [Start_url]), |
| 78 | | selenium: stop (Session). |
| 79 | | }}} |
| 80 | | |
| 81 | | ==== Selenium API ==== |
| 82 | | {{{ |
| 83 | | #!python |
| 84 | | test () -> |
| 85 | | Session = selenium :start (?HOST,?PORT, ?BROWSER, ?URL), |
| 86 | | Start_url = "http://charpi.net", |
| 87 | | selenium_api: open (Session, Start_url), |
| 88 | | selenium: stop (Session). |
| 89 | | }}} |
| 90 | | |
| 91 | | ==== Selenium Session ==== |
| 92 | | {{{ |
| 93 | | #!python |
| 94 | | test () -> |
| 95 | | Session = selenium :launch_session (?HOST,?PORT, ?BROWSER, ?URL), |
| 96 | | Start_url = "http://charpi.net", |
| 97 | | Session: open (Start_url), |
| 98 | | Session: stop_session (). |
| 99 | | }}} |