zena 1.1.3 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +23 -1
- data/MIT-LICENSE +2 -2
- data/README.rdoc +2 -15
- data/app/controllers/acls_controller.rb +1 -1
- data/app/controllers/documents_controller.rb +12 -3
- data/app/controllers/nodes_controller.rb +1 -3
- data/app/controllers/sites_controller.rb +7 -0
- data/app/controllers/versions_controller.rb +1 -1
- data/app/controllers/virtual_classes_controller.rb +7 -8
- data/app/models/acl.rb +3 -2
- data/app/models/relation_proxy.rb +2 -1
- data/app/models/role.rb +16 -0
- data/app/models/site.rb +48 -0
- data/app/models/text_document.rb +2 -1
- data/app/models/user.rb +2 -1
- data/app/models/zip.rb +2 -1
- data/app/views/acls/index.rhtml +11 -1
- data/app/views/documents/show.rhtml +1 -1
- data/app/views/relations/_add.erb +2 -2
- data/app/views/relations/_form.erb +5 -2
- data/app/views/relations/_li.erb +4 -1
- data/app/views/relations/index.erb +3 -3
- data/app/views/sites/_form.erb +1 -1
- data/app/views/sites/_job.erb +4 -0
- data/app/views/sites/index.erb +1 -1
- data/app/views/sites/jobs.erb +10 -0
- data/app/views/templates/document_create_tabs/_file.rhtml +3 -0
- data/app/views/zafu/default/Node-+search.zafu +2 -2
- data/bricks/acls/zena/init.rb +2 -1
- data/bricks/acls/zena/test/integration/acl_integration_test.rb +5 -5
- data/bricks/acls/zena/test/sites/erebus/acls.yml +2 -2
- data/bricks/acls/zena/test/unit/acl_test.rb +2 -2
- data/bricks/grid/lib/bricks/grid.rb +110 -0
- data/bricks/grid/zena/init.rb +4 -0
- data/bricks/math/lib/bricks/math.rb +1 -0
- data/bricks/pdf/lib/bricks/pdf.rb +10 -1
- data/bricks/sphinx/zena/tasks.rb +8 -40
- data/bricks/spreadsheet/README +31 -0
- data/bricks/spreadsheet/lib/bricks/spreadsheet.rb +293 -0
- data/bricks/spreadsheet/zena/init.rb +3 -0
- data/bricks/spreadsheet/zena/test/sites/zena/links.yml +11 -0
- data/bricks/spreadsheet/zena/test/unit/xlsx_test.rb +5 -0
- data/bricks/spreadsheet/zena/test/zafu/README +27 -0
- data/bricks/spreadsheet/zena/test/zafu/spreadsheet.yml +19 -0
- data/bricks/worker/lib/bricks/worker.rb +11 -5
- data/bricks/worker/zena/init.rb +8 -0
- data/bricks/worker/zena/migrate/20120501091514_add_site_id_to_jobs.rb +9 -0
- data/bricks/zena/zena/migrate/01_base.rb +0 -7
- data/bricks/zena/zena/migrate/20111214112233_add_comment_to_relations.rb +9 -0
- data/config/bricks.yml +15 -1
- data/config/environments/production.rb +2 -2
- data/config/gems.yml +6 -1
- data/doc/zafu_changes.yml +1 -1
- data/lib/tasks/zena.rake +6 -2
- data/lib/zena/app.rb +1 -1
- data/lib/zena/code/default_syntax.rb +5 -1
- data/lib/zena/db_helper/mysql.rb +5 -1
- data/lib/zena/deploy/app_init.rhtml +11 -7
- data/lib/zena/deploy/awstats.conf.rhtml +1 -1
- data/lib/zena/deploy/start_stop.rhtml +5 -5
- data/lib/zena/deploy/vhost.rhtml +16 -2
- data/lib/zena/deploy.rb +5 -3
- data/lib/zena/info.rb +1 -1
- data/lib/zena/parser/zazen_rules.rb +7 -7
- data/lib/zena/remote/node.rb +7 -0
- data/lib/zena/routes.rb +4 -5
- data/lib/zena/test_controller.rb +18 -1
- data/lib/zena/use/action.rb +13 -4
- data/lib/zena/use/ajax.rb +10 -4
- data/lib/zena/use/authlogic.rb +1 -1
- data/lib/zena/use/calendar.rb +4 -0
- data/lib/zena/use/conditional.rb +3 -0
- data/lib/zena/use/dates.rb +44 -4
- data/lib/zena/use/display.rb +45 -15
- data/lib/zena/use/forms.rb +59 -30
- data/lib/zena/use/query_builder.rb +12 -12
- data/lib/zena/use/recursion.rb +1 -1
- data/lib/zena/use/rendering.rb +18 -17
- data/lib/zena/use/urls.rb +2 -1
- data/lib/zena/use/zafu_safe_definitions.rb +0 -9
- data/lib/zena/use/zafu_templates.rb +2 -2
- data/lib/zena/use/zazen.rb +1 -3
- data/lib/zena/use.rb +13 -2
- data/lib/zena.rb +8 -2
- data/public/images/bullet_back.png +0 -0
- data/public/javascripts/grid.js +535 -0
- data/public/javascripts/tablekit.js +0 -0
- data/public/javascripts/window.js +0 -0
- data/public/javascripts/zena.js +17 -7
- data/public/stylesheets/admin.css +5 -1
- data/public/stylesheets/grid.css +19 -0
- data/test/fixtures/files/TestNode.zafu +123 -311
- data/test/fixtures/files/translations_fr.yml +6 -1
- data/test/functional/acls_controller_test.rb +2 -2
- data/test/functional/nodes_controller_test.rb +17 -11
- data/test/functional/virtual_classes_controller_test.rb +1 -1
- data/test/integration/query_node/basic.yml +9 -0
- data/test/integration/query_node/dates.yml +1 -1
- data/test/integration/zafu_compiler/ajax.yml +9 -9
- data/test/integration/zafu_compiler/basic.yml +0 -24
- data/test/integration/zafu_compiler/dates.yml +24 -7
- data/test/integration/zafu_compiler/display.yml +45 -2
- data/test/integration/zafu_compiler/errors.yml +0 -6
- data/test/integration/zafu_compiler/forms.yml +41 -3
- data/test/integration/zafu_compiler/query.yml +29 -3
- data/test/integration/zafu_compiler/roles.yml +0 -4
- data/test/integration/zafu_compiler/safe_definitions.yml +1 -1
- data/test/integration/zafu_compiler_test.rb +11 -3
- data/test/selenium/Add/add3.rsel +8 -8
- data/test/selenium/Drop/drop1.rsel +12 -12
- data/test/selenium/Drop/drop2.rsel +14 -14
- data/test/selenium/Drop/drop3.rsel +21 -21
- data/test/selenium/Drop/drop4.rsel +1 -1
- data/test/selenium/Edit/edit2.rsel +9 -9
- data/test/selenium/Edit/edit4.rsel +55 -0
- data/test/selenium/Edit/edit5.rsel +41 -0
- data/test/selenium/Edit/edit6.rsel +53 -0
- data/test/selenium/Filter/0setup.rsel +12 -0
- data/test/selenium/Filter/filter1.rsel +9 -0
- data/test/selenium/Filter/filter2.rsel +9 -0
- data/test/selenium/Form/form1.rsel +1 -1
- data/test/selenium/Form/form2.rsel +1 -1
- data/test/selenium/Form/form3.rsel +15 -0
- data/test/selenium/Grid/0setup.rsel +13 -0
- data/test/selenium/Grid/grid1.rsel +11 -0
- data/test/selenium/Swap/0setup.rsel +12 -0
- data/test/selenium/Swap/swap1.rsel +13 -0
- data/test/selenium/Swap/swap2.rsel +11 -0
- data/test/selenium/Toggle/toggle1.rsel +6 -6
- data/test/sites/zena/versions.yml +1 -1
- data/test/unit/relation_proxy_test.rb +36 -0
- data/test/unit/site_test.rb +10 -2
- data/test/unit/zena/use/rendering_test.rb +7 -6
- data/test/unit/zena/use/zazen_test.rb +1 -2
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run 2.tmCommand +24 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Context.tmCommand +58 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Focused Should.tmCommand +88 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run.tmCommand +27 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/YAML to Shoulda.tmCommand +23 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Context.tmPreferences +19 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Should.tmPreferences +19 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory attributes for.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory build.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define with class.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_next.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_sequence.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_bad_value.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_contains.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_does_not_contain.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_good_value.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_same_elements.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_save.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_sent_email.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_valid.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/association.tmSnippet +17 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/attribute.tmSnippet +17 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/before_should block.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block get.tmSnippet +22 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block post.tmSnippet +23 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block with setup.tmSnippet +25 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/setup.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block with before proc.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_allow_values_for.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_assign_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful denied.tmSnippet +20 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful.tmSnippet +20 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_belong_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change by.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change from to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_at_least.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_in_range.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_is.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_value_in_range.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_eventually.tmSnippet +18 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_filter_params.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_and_belong_to_many.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_class_methods.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_column.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_columns.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_index.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_indices.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_instance_methods.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_many.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_named_scope.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_one.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_readonly_attributes.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_mass_assignment_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_values_for.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_assign_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_change.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_set_the_flash.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_redirect_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_a_form.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_template.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_with_layout.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_without_layout.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with_content_type.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_return_from_session.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_route.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_set_the_flash_to.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_acceptance_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_numericality_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_presence_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of with scope.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of.tmSnippet +16 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/catch_exception.rb +39 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/run_script.rb +104 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/stdin_dialog.rb +14 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/test.rb +17 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/todo.txt +13 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/bin/yaml_to_shoulda.rb +25 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Syntaxes/Ruby on Rails (Shoulda).tmLanguage +166 -0
- data/vendor/TextMate/Ruby Shoulda.tmbundle/info.plist +304 -0
- data/vendor/TextMate/Zena.tmbundle/Commands/Run all yaml tests.tmCommand +37 -0
- data/vendor/TextMate/Zena.tmbundle/Commands/Run focused yaml test.tmCommand +52 -0
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/catch_exception.rb +39 -0
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/run_script.rb +118 -0
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/stdin_dialog.rb +14 -0
- data/vendor/TextMate/Zena.tmbundle/info.plist +17 -0
- data/vendor/plugins/selenium-on-rails/CHANGELOG +125 -0
- data/vendor/plugins/selenium-on-rails/LICENSE-2.0.txt +202 -0
- data/vendor/plugins/selenium-on-rails/README.md +202 -0
- data/vendor/plugins/selenium-on-rails/Rakefile +38 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumController.html +265 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumHelper.html +148 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/FixtureLoader.html +231 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/PartialsSupport.html +195 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Paths.html +295 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/RSelenese.html +219 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Renderer.html +156 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/Selenese.html +179 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/SuiteRenderer.html +223 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilder.html +441 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderAccessors.html +3098 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderActions.html +2080 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserAccessors.html +116 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserActions.html +116 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails.html +126 -0
- data/vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRailsConfig.html +150 -0
- data/vendor/plugins/selenium-on-rails/doc/files/CHANGELOG.html +422 -0
- data/vendor/plugins/selenium-on-rails/doc/files/README.html +321 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/controllers/selenium_controller_rb.html +108 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_helper_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/acceptance_test_runner_rb.html +222 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/fixture_loader_rb.html +109 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/partials_support_rb.html +111 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/paths_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/renderer_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/rselenese_rb.html +118 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/selenese_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/suite_renderer_rb.html +101 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_accessors_rb.html +114 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_actions_rb.html +113 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails/test_builder_rb.html +120 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_config_rb.html +108 -0
- data/vendor/plugins/selenium-on-rails/doc/files/lib/selenium_on_rails_rb.html +115 -0
- data/vendor/plugins/selenium-on-rails/doc/fr_class_index.html +42 -0
- data/vendor/plugins/selenium-on-rails/doc/fr_file_index.html +43 -0
- data/vendor/plugins/selenium-on-rails/doc/fr_method_index.html +182 -0
- data/vendor/plugins/selenium-on-rails/doc/index.html +24 -0
- data/vendor/plugins/selenium-on-rails/doc/rdoc-style.css +208 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/USAGE +19 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/selenium_generator.rb +50 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rhtml.rhtml +16 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/rselenese.rhtml +14 -0
- data/vendor/plugins/selenium-on-rails/generators/selenium/templates/selenese.rhtml +11 -0
- data/vendor/plugins/selenium-on-rails/init.rb +15 -0
- data/vendor/plugins/selenium-on-rails/lib/controllers/selenium_controller.rb +122 -0
- data/vendor/plugins/selenium-on-rails/lib/controllers/switch_environment_controller.rb +16 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_helper.rb +8 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/acceptance_test_runner.rb +215 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/fixture_loader.rb +57 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/partials_support.rb +36 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/paths.rb +61 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/renderer.rb +20 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/rselenese.rb +44 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/selenese.rb +87 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/suite_renderer.rb +56 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder.rb +116 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_accessors.rb +1002 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_actions.rb +514 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_accessors.rb.example +91 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails/test_builder_user_actions.rb.example +24 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails.rb +11 -0
- data/vendor/plugins/selenium-on-rails/lib/selenium_on_rails_config.rb +30 -0
- data/vendor/plugins/selenium-on-rails/lib/views/layouts/layout.rhtml +18 -0
- data/vendor/plugins/selenium-on-rails/lib/views/record.rhtml +5 -0
- data/vendor/plugins/selenium-on-rails/lib/views/selenium_helper.rb +9 -0
- data/vendor/plugins/selenium-on-rails/lib/views/setup.rhtml +67 -0
- data/vendor/plugins/selenium-on-rails/lib/views/test_suite.rhtml +26 -0
- data/vendor/plugins/selenium-on-rails/routes.rb +24 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/Blank.html +7 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/InjectedRemoteRunner.html +8 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/RemoteRunner.html +110 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/SeleniumLog.html +109 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/TestPrompt.html +145 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner-splash.html +55 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.hta +177 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/TestRunner.html +177 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butmin.gif +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/butplus.gif +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.css +298 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/domviewer.html +16 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/domviewer/selenium-domviewer.js +205 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/all.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/continue_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/pause_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/selected.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/step.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/icons/step_disabled.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/iedoc-core.xml +1759 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/iedoc.xml +1800 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/cssQuery-p.js +6 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level2.js +142 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-level3.js +150 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery-standard.js +53 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/cssQuery/src/cssQuery.js +356 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/prototype.js +2006 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/builder.js +101 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/controls.js +815 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/dragdrop.js +915 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/effects.js +958 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/scriptaculous.js +47 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/slider.js +283 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/scriptaculous/unittest.js +383 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/lib/snapsie.js +91 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/find_matching_child.js +69 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/htmlutils.js +1616 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/injection.html +72 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-api.js +3184 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserbot.js +2300 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-browserdetect.js +153 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-commandhandlers.js +377 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-executionloop.js +175 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-logging.js +148 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-remoterunner.js +695 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-testrunner.js +1362 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/selenium-version.js +5 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-doc.html +803 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-element.js +1537 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/ui-map-sample.js +979 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js +3 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/user-extensions.js.sample +75 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/scripts/xmlextras.js +153 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-logo.png +0 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium-test.css +43 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/selenium.css +316 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/dom.js +566 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/javascript-xpath-0.1.11.js +2816 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/util.js +549 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xmltoken.js +149 -0
- data/vendor/plugins/selenium-on-rails/selenium-core/xpath/xpath.js +2450 -0
- data/vendor/plugins/selenium-on-rails/tasks/test_acceptance.rake +8 -0
- data/vendor/plugins/selenium-on-rails/test/fixtures/config.yml +37 -0
- data/vendor/plugins/selenium-on-rails/test/fixtures/selenium.yml +27 -0
- data/vendor/plugins/selenium-on-rails/test/paths_test.rb +72 -0
- data/vendor/plugins/selenium-on-rails/test/renderer_test.rb +157 -0
- data/vendor/plugins/selenium-on-rails/test/rselenese_test.rb +708 -0
- data/vendor/plugins/selenium-on-rails/test/selenese_test.rb +242 -0
- data/vendor/plugins/selenium-on-rails/test/selenium_controller_test.rb +67 -0
- data/vendor/plugins/selenium-on-rails/test/selenium_on_rails_config_test.rb +43 -0
- data/vendor/plugins/selenium-on-rails/test/selenium_support_test.rb +35 -0
- data/vendor/plugins/selenium-on-rails/test/setup_test.rb +31 -0
- data/vendor/plugins/selenium-on-rails/test/suite_renderer_test.rb +109 -0
- data/vendor/plugins/selenium-on-rails/test/switch_environment_controller_test.rb +17 -0
- data/vendor/plugins/selenium-on-rails/test/test_builder_functions_authortest.rb +51 -0
- data/vendor/plugins/selenium-on-rails/test/test_helper.rb +101 -0
- data/vendor/plugins/selenium-on-rails/test_data/_partial.rsel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/own_layout.html +12 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_html.html +6 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_nesting.rsel +2 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rhtml.rhtml +6 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_rsel.rsel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/_sel.sel +5 -0
- data/vendor/plugins/selenium-on-rails/test_data/partials/all_partials.rsel +5 -0
- data/vendor/plugins/selenium-on-rails/test_data/rhtml.rhtml +7 -0
- data/vendor/plugins/selenium-on-rails/test_data/rselenese.rsel +8 -0
- data/vendor/plugins/selenium-on-rails/test_data/selenese.sel +7 -0
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/subsuite/suite_one_subsuite_testcase.sel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase1.sel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/suite_one/suite_one_testcase2.sel +1 -0
- data/vendor/plugins/selenium-on-rails/test_data/suite_two/suite_two_testcase.sel +1 -0
- data/zena.gemspec +290 -7
- metadata +346 -52
- data/app/views/nodes/_table.rhtml +0 -14
- data/lib/zena/use/grid.rb +0 -154
@@ -0,0 +1,1800 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
|
3
|
+
<apidoc>
|
4
|
+
|
5
|
+
<top>Defines an object that runs Selenium commands.
|
6
|
+
|
7
|
+
<h3><a name="locators"></a>Element Locators</h3>
|
8
|
+
<p>
|
9
|
+
Element Locators tell Selenium which HTML element a command refers to.
|
10
|
+
The format of a locator is:</p>
|
11
|
+
<blockquote>
|
12
|
+
<em>locatorType</em><strong>=</strong><em>argument</em>
|
13
|
+
</blockquote>
|
14
|
+
|
15
|
+
<p>
|
16
|
+
We support the following strategies for locating elements:
|
17
|
+
</p>
|
18
|
+
|
19
|
+
<ul>
|
20
|
+
<li><strong>identifier</strong>=<em>id</em>:
|
21
|
+
Select the element with the specified @id attribute. If no match is
|
22
|
+
found, select the first element whose @name attribute is <em>id</em>.
|
23
|
+
(This is normally the default; see below.)</li>
|
24
|
+
<li><strong>id</strong>=<em>id</em>:
|
25
|
+
Select the element with the specified @id attribute.</li>
|
26
|
+
|
27
|
+
<li><strong>name</strong>=<em>name</em>:
|
28
|
+
Select the first element with the specified @name attribute.
|
29
|
+
<ul class="first last simple">
|
30
|
+
<li>username</li>
|
31
|
+
<li>name=username</li>
|
32
|
+
</ul>
|
33
|
+
|
34
|
+
<p>The name may optionally be followed by one or more <em>element-filters</em>, separated from the name by whitespace. If the <em>filterType</em> is not specified, <strong>value</strong> is assumed.</p>
|
35
|
+
|
36
|
+
<ul class="first last simple">
|
37
|
+
<li>name=flavour value=chocolate</li>
|
38
|
+
</ul>
|
39
|
+
</li>
|
40
|
+
<li><strong>dom</strong>=<em>javascriptExpression</em>:
|
41
|
+
|
42
|
+
Find an element by evaluating the specified string. This allows you to traverse the HTML Document Object
|
43
|
+
Model using JavaScript. Note that you must not return a value in this string; simply make it the last expression in the block.
|
44
|
+
<ul class="first last simple">
|
45
|
+
<li>dom=document.forms['myForm'].myDropdown</li>
|
46
|
+
<li>dom=document.images[56]</li>
|
47
|
+
<li>dom=function foo() { return document.links[1]; }; foo();</li>
|
48
|
+
</ul>
|
49
|
+
|
50
|
+
</li>
|
51
|
+
|
52
|
+
<li><strong>xpath</strong>=<em>xpathExpression</em>:
|
53
|
+
Locate an element using an XPath expression.
|
54
|
+
<ul class="first last simple">
|
55
|
+
<li>xpath=//img[@alt='The image alt text']</li>
|
56
|
+
<li>xpath=//table[@id='table1']//tr[4]/td[2]</li>
|
57
|
+
<li>xpath=//a[contains(@href,'#id1')]</li>
|
58
|
+
<li>xpath=//a[contains(@href,'#id1')]/@class</li>
|
59
|
+
<li>xpath=(//table[@class='stylee'])//th[text()='theHeaderText']/../td</li>
|
60
|
+
<li>xpath=//input[@name='name2' and @value='yes']</li>
|
61
|
+
<li>xpath=//*[text()="right"]</li>
|
62
|
+
|
63
|
+
</ul>
|
64
|
+
</li>
|
65
|
+
<li><strong>link</strong>=<em>textPattern</em>:
|
66
|
+
Select the link (anchor) element which contains text matching the
|
67
|
+
specified <em>pattern</em>.
|
68
|
+
<ul class="first last simple">
|
69
|
+
<li>link=The link text</li>
|
70
|
+
</ul>
|
71
|
+
|
72
|
+
</li>
|
73
|
+
|
74
|
+
<li><strong>css</strong>=<em>cssSelectorSyntax</em>:
|
75
|
+
Select the element using css selectors. Please refer to <a href="http://www.w3.org/TR/REC-CSS2/selector.html">CSS2 selectors</a>, <a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/">CSS3 selectors</a> for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package.
|
76
|
+
<ul class="first last simple">
|
77
|
+
<li>css=a[href="#id3"]</li>
|
78
|
+
<li>css=span#firstChild + span</li>
|
79
|
+
</ul>
|
80
|
+
<p>Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after). </p>
|
81
|
+
</li>
|
82
|
+
|
83
|
+
<li><strong>ui</strong>=<em>uiSpecifierString</em>:
|
84
|
+
Locate an element by resolving the UI specifier string to another locator, and evaluating it. See the <a href="http://svn.openqa.org/fisheye/browse/~raw,r=trunk/selenium/trunk/src/main/resources/core/scripts/ui-doc.html">Selenium UI-Element Reference</a> for more details.
|
85
|
+
<ul class="first last simple">
|
86
|
+
<li>ui=loginPages::loginButton()</li>
|
87
|
+
<li>ui=settingsPages::toggle(label=Hide Email)</li>
|
88
|
+
<li>ui=forumPages::postBody(index=2)//a[2]</li>
|
89
|
+
</ul>
|
90
|
+
</li>
|
91
|
+
|
92
|
+
</ul>
|
93
|
+
|
94
|
+
<p>
|
95
|
+
Without an explicit locator prefix, Selenium uses the following default
|
96
|
+
strategies:
|
97
|
+
</p>
|
98
|
+
|
99
|
+
<ul class="simple">
|
100
|
+
<li><strong>dom</strong>, for locators starting with "document."</li>
|
101
|
+
<li><strong>xpath</strong>, for locators starting with "//"</li>
|
102
|
+
<li><strong>identifier</strong>, otherwise</li>
|
103
|
+
</ul>
|
104
|
+
|
105
|
+
<h3><a name="element-filters">Element Filters</a></h3>
|
106
|
+
<blockquote>
|
107
|
+
<p>Element filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator.</p>
|
108
|
+
<p>Filters look much like locators, ie.</p>
|
109
|
+
<blockquote>
|
110
|
+
<em>filterType</em><strong>=</strong><em>argument</em></blockquote>
|
111
|
+
|
112
|
+
<p>Supported element-filters are:</p>
|
113
|
+
<p><strong>value=</strong><em>valuePattern</em></p>
|
114
|
+
<blockquote>
|
115
|
+
Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons.</blockquote>
|
116
|
+
<p><strong>index=</strong><em>index</em></p>
|
117
|
+
<blockquote>
|
118
|
+
Selects a single element based on its position in the list (offset from zero).</blockquote>
|
119
|
+
</blockquote>
|
120
|
+
|
121
|
+
<h3><a name="patterns"></a>String-match Patterns</h3>
|
122
|
+
|
123
|
+
<p>
|
124
|
+
Various Pattern syntaxes are available for matching string values:
|
125
|
+
</p>
|
126
|
+
<ul>
|
127
|
+
<li><strong>glob:</strong><em>pattern</em>:
|
128
|
+
Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a
|
129
|
+
kind of limited regular-expression syntax typically used in command-line
|
130
|
+
shells. In a glob pattern, "*" represents any sequence of characters, and "?"
|
131
|
+
represents any single character. Glob patterns match against the entire
|
132
|
+
string.</li>
|
133
|
+
<li><strong>regexp:</strong><em>regexp</em>:
|
134
|
+
Match a string using a regular-expression. The full power of JavaScript
|
135
|
+
regular-expressions is available.</li>
|
136
|
+
<li><strong>regexpi:</strong><em>regexpi</em>:
|
137
|
+
Match a string using a case-insensitive regular-expression.</li>
|
138
|
+
<li><strong>exact:</strong><em>string</em>:
|
139
|
+
|
140
|
+
Match a string exactly, verbatim, without any of that fancy wildcard
|
141
|
+
stuff.</li>
|
142
|
+
</ul>
|
143
|
+
<p>
|
144
|
+
If no pattern prefix is specified, Selenium assumes that it's a "glob"
|
145
|
+
pattern.
|
146
|
+
</p>
|
147
|
+
<p>
|
148
|
+
For commands that return multiple values (such as verifySelectOptions),
|
149
|
+
the string being matched is a comma-separated list of the return values,
|
150
|
+
where both commas and backslashes in the values are backslash-escaped.
|
151
|
+
When providing a pattern, the optional matching syntax (i.e. glob,
|
152
|
+
regexp, etc.) is specified once, as usual, at the beginning of the
|
153
|
+
pattern.
|
154
|
+
</p></top>
|
155
|
+
|
156
|
+
<function name="click">
|
157
|
+
|
158
|
+
<param name="locator">an element locator</param>
|
159
|
+
|
160
|
+
<comment>Clicks on a link, button, checkbox or radio button. If the click action
|
161
|
+
causes a new page to load (like a link usually does), call
|
162
|
+
waitForPageToLoad.</comment>
|
163
|
+
|
164
|
+
</function>
|
165
|
+
|
166
|
+
<function name="doubleClick">
|
167
|
+
|
168
|
+
<param name="locator">an element locator</param>
|
169
|
+
|
170
|
+
<comment>Double clicks on a link, button, checkbox or radio button. If the double click action
|
171
|
+
causes a new page to load (like a link usually does), call
|
172
|
+
waitForPageToLoad.</comment>
|
173
|
+
|
174
|
+
</function>
|
175
|
+
|
176
|
+
<function name="contextMenu">
|
177
|
+
|
178
|
+
<param name="locator">an element locator</param>
|
179
|
+
|
180
|
+
<comment>Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).</comment>
|
181
|
+
|
182
|
+
</function>
|
183
|
+
|
184
|
+
<function name="clickAt">
|
185
|
+
|
186
|
+
<param name="locator">an element locator</param>
|
187
|
+
|
188
|
+
<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</param>
|
189
|
+
|
190
|
+
<comment>Clicks on a link, button, checkbox or radio button. If the click action
|
191
|
+
causes a new page to load (like a link usually does), call
|
192
|
+
waitForPageToLoad.</comment>
|
193
|
+
|
194
|
+
</function>
|
195
|
+
|
196
|
+
<function name="doubleClickAt">
|
197
|
+
|
198
|
+
<param name="locator">an element locator</param>
|
199
|
+
|
200
|
+
<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</param>
|
201
|
+
|
202
|
+
<comment>Doubleclicks on a link, button, checkbox or radio button. If the action
|
203
|
+
causes a new page to load (like a link usually does), call
|
204
|
+
waitForPageToLoad.</comment>
|
205
|
+
|
206
|
+
</function>
|
207
|
+
|
208
|
+
<function name="contextMenuAt">
|
209
|
+
|
210
|
+
<param name="locator">an element locator</param>
|
211
|
+
|
212
|
+
<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</param>
|
213
|
+
|
214
|
+
<comment>Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).</comment>
|
215
|
+
|
216
|
+
</function>
|
217
|
+
|
218
|
+
<function name="fireEvent">
|
219
|
+
|
220
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
221
|
+
|
222
|
+
<param name="eventName">the event name, e.g. "focus" or "blur"</param>
|
223
|
+
|
224
|
+
<comment>Explicitly simulate an event, to trigger the corresponding "on<em>event</em>"
|
225
|
+
handler.</comment>
|
226
|
+
|
227
|
+
</function>
|
228
|
+
|
229
|
+
<function name="focus">
|
230
|
+
|
231
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
232
|
+
|
233
|
+
<comment>Move the focus to the specified element; for example, if the element is an input field, move the cursor to that field.</comment>
|
234
|
+
|
235
|
+
</function>
|
236
|
+
|
237
|
+
<function name="keyPress">
|
238
|
+
|
239
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
240
|
+
|
241
|
+
<param name="keySequence">Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119".</param>
|
242
|
+
|
243
|
+
<comment>Simulates a user pressing and releasing a key.</comment>
|
244
|
+
|
245
|
+
</function>
|
246
|
+
|
247
|
+
<function name="shiftKeyDown">
|
248
|
+
|
249
|
+
<comment>Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.</comment>
|
250
|
+
|
251
|
+
</function>
|
252
|
+
|
253
|
+
<function name="shiftKeyUp">
|
254
|
+
|
255
|
+
<comment>Release the shift key.</comment>
|
256
|
+
|
257
|
+
</function>
|
258
|
+
|
259
|
+
<function name="metaKeyDown">
|
260
|
+
|
261
|
+
<comment>Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.</comment>
|
262
|
+
|
263
|
+
</function>
|
264
|
+
|
265
|
+
<function name="metaKeyUp">
|
266
|
+
|
267
|
+
<comment>Release the meta key.</comment>
|
268
|
+
|
269
|
+
</function>
|
270
|
+
|
271
|
+
<function name="altKeyDown">
|
272
|
+
|
273
|
+
<comment>Press the alt key and hold it down until doAltUp() is called or a new page is loaded.</comment>
|
274
|
+
|
275
|
+
</function>
|
276
|
+
|
277
|
+
<function name="altKeyUp">
|
278
|
+
|
279
|
+
<comment>Release the alt key.</comment>
|
280
|
+
|
281
|
+
</function>
|
282
|
+
|
283
|
+
<function name="controlKeyDown">
|
284
|
+
|
285
|
+
<comment>Press the control key and hold it down until doControlUp() is called or a new page is loaded.</comment>
|
286
|
+
|
287
|
+
</function>
|
288
|
+
|
289
|
+
<function name="controlKeyUp">
|
290
|
+
|
291
|
+
<comment>Release the control key.</comment>
|
292
|
+
|
293
|
+
</function>
|
294
|
+
|
295
|
+
<function name="keyDown">
|
296
|
+
|
297
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
298
|
+
|
299
|
+
<param name="keySequence">Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119".</param>
|
300
|
+
|
301
|
+
<comment>Simulates a user pressing a key (without releasing it yet).</comment>
|
302
|
+
|
303
|
+
</function>
|
304
|
+
|
305
|
+
<function name="keyUp">
|
306
|
+
|
307
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
308
|
+
|
309
|
+
<param name="keySequence">Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119".</param>
|
310
|
+
|
311
|
+
<comment>Simulates a user releasing a key.</comment>
|
312
|
+
|
313
|
+
</function>
|
314
|
+
|
315
|
+
<function name="mouseOver">
|
316
|
+
|
317
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
318
|
+
|
319
|
+
<comment>Simulates a user hovering a mouse over the specified element.</comment>
|
320
|
+
|
321
|
+
</function>
|
322
|
+
|
323
|
+
<function name="mouseOut">
|
324
|
+
|
325
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
326
|
+
|
327
|
+
<comment>Simulates a user moving the mouse pointer away from the specified element.</comment>
|
328
|
+
|
329
|
+
</function>
|
330
|
+
|
331
|
+
<function name="mouseDown">
|
332
|
+
|
333
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
334
|
+
|
335
|
+
<comment>Simulates a user pressing the left mouse button (without releasing it yet) on
|
336
|
+
the specified element.</comment>
|
337
|
+
|
338
|
+
</function>
|
339
|
+
|
340
|
+
<function name="mouseDownRight">
|
341
|
+
|
342
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
343
|
+
|
344
|
+
<comment>Simulates a user pressing the right mouse button (without releasing it yet) on
|
345
|
+
the specified element.</comment>
|
346
|
+
|
347
|
+
</function>
|
348
|
+
|
349
|
+
<function name="mouseDownAt">
|
350
|
+
|
351
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
352
|
+
|
353
|
+
<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</param>
|
354
|
+
|
355
|
+
<comment>Simulates a user pressing the left mouse button (without releasing it yet) at
|
356
|
+
the specified location.</comment>
|
357
|
+
|
358
|
+
</function>
|
359
|
+
|
360
|
+
<function name="mouseDownRightAt">
|
361
|
+
|
362
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
363
|
+
|
364
|
+
<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</param>
|
365
|
+
|
366
|
+
<comment>Simulates a user pressing the right mouse button (without releasing it yet) at
|
367
|
+
the specified location.</comment>
|
368
|
+
|
369
|
+
</function>
|
370
|
+
|
371
|
+
<function name="mouseUp">
|
372
|
+
|
373
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
374
|
+
|
375
|
+
<comment>Simulates the event that occurs when the user releases the mouse button (i.e., stops
|
376
|
+
holding the button down) on the specified element.</comment>
|
377
|
+
|
378
|
+
</function>
|
379
|
+
|
380
|
+
<function name="mouseUpRight">
|
381
|
+
|
382
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
383
|
+
|
384
|
+
<comment>Simulates the event that occurs when the user releases the right mouse button (i.e., stops
|
385
|
+
holding the button down) on the specified element.</comment>
|
386
|
+
|
387
|
+
</function>
|
388
|
+
|
389
|
+
<function name="mouseUpAt">
|
390
|
+
|
391
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
392
|
+
|
393
|
+
<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</param>
|
394
|
+
|
395
|
+
<comment>Simulates the event that occurs when the user releases the mouse button (i.e., stops
|
396
|
+
holding the button down) at the specified location.</comment>
|
397
|
+
|
398
|
+
</function>
|
399
|
+
|
400
|
+
<function name="mouseUpRightAt">
|
401
|
+
|
402
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
403
|
+
|
404
|
+
<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</param>
|
405
|
+
|
406
|
+
<comment>Simulates the event that occurs when the user releases the right mouse button (i.e., stops
|
407
|
+
holding the button down) at the specified location.</comment>
|
408
|
+
|
409
|
+
</function>
|
410
|
+
|
411
|
+
<function name="mouseMove">
|
412
|
+
|
413
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
414
|
+
|
415
|
+
<comment>Simulates a user pressing the mouse button (without releasing it yet) on
|
416
|
+
the specified element.</comment>
|
417
|
+
|
418
|
+
</function>
|
419
|
+
|
420
|
+
<function name="mouseMoveAt">
|
421
|
+
|
422
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
423
|
+
|
424
|
+
<param name="coordString">specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.</param>
|
425
|
+
|
426
|
+
<comment>Simulates a user pressing the mouse button (without releasing it yet) on
|
427
|
+
the specified element.</comment>
|
428
|
+
|
429
|
+
</function>
|
430
|
+
|
431
|
+
<function name="type">
|
432
|
+
|
433
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
434
|
+
|
435
|
+
<param name="value">the value to type</param>
|
436
|
+
|
437
|
+
<comment>Sets the value of an input field, as though you typed it in.
|
438
|
+
|
439
|
+
<p>Can also be used to set the value of combo boxes, check boxes, etc. In these cases,
|
440
|
+
value should be the value of the option selected, not the visible text.</p></comment>
|
441
|
+
|
442
|
+
</function>
|
443
|
+
|
444
|
+
<function name="typeKeys">
|
445
|
+
|
446
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
447
|
+
|
448
|
+
<param name="value">the value to type</param>
|
449
|
+
|
450
|
+
<comment>Simulates keystroke events on the specified element, as though you typed the value key-by-key.
|
451
|
+
|
452
|
+
<p>This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string;
|
453
|
+
this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.</p>
|
454
|
+
|
455
|
+
<p>Unlike the simple "type" command, which forces the specified value into the page directly, this command
|
456
|
+
may or may not have any visible effect, even in cases where typing keys would normally have a visible effect.
|
457
|
+
For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in
|
458
|
+
the field.</p>
|
459
|
+
<p>In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to
|
460
|
+
send the keystroke events corresponding to what you just typed.</p></comment>
|
461
|
+
|
462
|
+
</function>
|
463
|
+
|
464
|
+
<function name="setSpeed">
|
465
|
+
|
466
|
+
<param name="value">the number of milliseconds to pause after operation</param>
|
467
|
+
|
468
|
+
<comment>Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation). By default, there is no such delay, i.e.,
|
469
|
+
the delay is 0 milliseconds.</comment>
|
470
|
+
|
471
|
+
</function>
|
472
|
+
|
473
|
+
<function name="getSpeed">
|
474
|
+
|
475
|
+
<return type="string">the execution speed in milliseconds.</return>
|
476
|
+
|
477
|
+
<comment>Get execution speed (i.e., get the millisecond length of the delay following each selenium operation). By default, there is no such delay, i.e.,
|
478
|
+
the delay is 0 milliseconds.
|
479
|
+
|
480
|
+
See also setSpeed.</comment>
|
481
|
+
|
482
|
+
</function>
|
483
|
+
|
484
|
+
<function name="check">
|
485
|
+
|
486
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
487
|
+
|
488
|
+
<comment>Check a toggle-button (checkbox/radio)</comment>
|
489
|
+
|
490
|
+
</function>
|
491
|
+
|
492
|
+
<function name="uncheck">
|
493
|
+
|
494
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
495
|
+
|
496
|
+
<comment>Uncheck a toggle-button (checkbox/radio)</comment>
|
497
|
+
|
498
|
+
</function>
|
499
|
+
|
500
|
+
<function name="select">
|
501
|
+
|
502
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
503
|
+
|
504
|
+
<param name="optionLocator">an option locator (a label by default)</param>
|
505
|
+
|
506
|
+
<comment>Select an option from a drop-down using an option locator.
|
507
|
+
|
508
|
+
<p>
|
509
|
+
Option locators provide different ways of specifying options of an HTML
|
510
|
+
Select element (e.g. for selecting a specific option, or for asserting
|
511
|
+
that the selected option satisfies a specification). There are several
|
512
|
+
forms of Select Option Locator.
|
513
|
+
</p>
|
514
|
+
<ul>
|
515
|
+
<li><strong>label</strong>=<em>labelPattern</em>:
|
516
|
+
matches options based on their labels, i.e. the visible text. (This
|
517
|
+
is the default.)
|
518
|
+
<ul class="first last simple">
|
519
|
+
<li>label=regexp:^[Oo]ther</li>
|
520
|
+
</ul>
|
521
|
+
</li>
|
522
|
+
<li><strong>value</strong>=<em>valuePattern</em>:
|
523
|
+
matches options based on their values.
|
524
|
+
<ul class="first last simple">
|
525
|
+
<li>value=other</li>
|
526
|
+
</ul>
|
527
|
+
|
528
|
+
|
529
|
+
</li>
|
530
|
+
<li><strong>id</strong>=<em>id</em>:
|
531
|
+
|
532
|
+
matches options based on their ids.
|
533
|
+
<ul class="first last simple">
|
534
|
+
<li>id=option1</li>
|
535
|
+
</ul>
|
536
|
+
</li>
|
537
|
+
<li><strong>index</strong>=<em>index</em>:
|
538
|
+
matches an option based on its index (offset from zero).
|
539
|
+
<ul class="first last simple">
|
540
|
+
|
541
|
+
<li>index=2</li>
|
542
|
+
</ul>
|
543
|
+
</li>
|
544
|
+
</ul>
|
545
|
+
<p>
|
546
|
+
If no option locator prefix is provided, the default behaviour is to match on <strong>label</strong>.
|
547
|
+
</p></comment>
|
548
|
+
|
549
|
+
</function>
|
550
|
+
|
551
|
+
<function name="addSelection">
|
552
|
+
|
553
|
+
<param name="locator">an <a href="#locators">element locator</a> identifying a multi-select box</param>
|
554
|
+
|
555
|
+
<param name="optionLocator">an option locator (a label by default)</param>
|
556
|
+
|
557
|
+
<comment>Add a selection to the set of selected options in a multi-select element using an option locator.
|
558
|
+
|
559
|
+
@see #doSelect for details of option locators</comment>
|
560
|
+
|
561
|
+
</function>
|
562
|
+
|
563
|
+
<function name="removeSelection">
|
564
|
+
|
565
|
+
<param name="locator">an <a href="#locators">element locator</a> identifying a multi-select box</param>
|
566
|
+
|
567
|
+
<param name="optionLocator">an option locator (a label by default)</param>
|
568
|
+
|
569
|
+
<comment>Remove a selection from the set of selected options in a multi-select element using an option locator.
|
570
|
+
|
571
|
+
@see #doSelect for details of option locators</comment>
|
572
|
+
|
573
|
+
</function>
|
574
|
+
|
575
|
+
<function name="removeAllSelections">
|
576
|
+
|
577
|
+
<param name="locator">an <a href="#locators">element locator</a> identifying a multi-select box</param>
|
578
|
+
|
579
|
+
<comment>Unselects all of the selected options in a multi-select element.</comment>
|
580
|
+
|
581
|
+
</function>
|
582
|
+
|
583
|
+
<function name="submit">
|
584
|
+
|
585
|
+
<param name="formLocator">an <a href="#locators">element locator</a> for the form you want to submit</param>
|
586
|
+
|
587
|
+
<comment>Submit the specified form. This is particularly useful for forms without
|
588
|
+
submit buttons, e.g. single-input "Search" forms.</comment>
|
589
|
+
|
590
|
+
</function>
|
591
|
+
|
592
|
+
<function name="open">
|
593
|
+
|
594
|
+
<param name="url">the URL to open; may be relative or absolute</param>
|
595
|
+
|
596
|
+
<comment>Opens an URL in the test frame. This accepts both relative and absolute
|
597
|
+
URLs.
|
598
|
+
|
599
|
+
The "open" command waits for the page to load before proceeding,
|
600
|
+
ie. the "AndWait" suffix is implicit.
|
601
|
+
|
602
|
+
<em>Note</em>: The URL must be on the same domain as the runner HTML
|
603
|
+
due to security restrictions in the browser (Same Origin Policy). If you
|
604
|
+
need to open an URL on another domain, use the Selenium Server to start a
|
605
|
+
new browser session on that domain.</comment>
|
606
|
+
|
607
|
+
</function>
|
608
|
+
|
609
|
+
<function name="openWindow">
|
610
|
+
|
611
|
+
<param name="url">the URL to open, which can be blank</param>
|
612
|
+
|
613
|
+
<param name="windowID">the JavaScript window ID of the window to select</param>
|
614
|
+
|
615
|
+
<comment>Opens a popup window (if a window with that ID isn't already open).
|
616
|
+
After opening the window, you'll need to select it using the selectWindow
|
617
|
+
command.
|
618
|
+
|
619
|
+
<p>This command can also be a useful workaround for bug SEL-339. In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example).
|
620
|
+
In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using
|
621
|
+
an empty (blank) url, like this: openWindow("", "myFunnyWindow").</p></comment>
|
622
|
+
|
623
|
+
</function>
|
624
|
+
|
625
|
+
<function name="selectWindow">
|
626
|
+
|
627
|
+
<param name="windowID">the JavaScript window ID of the window to select</param>
|
628
|
+
|
629
|
+
<comment>Selects a popup window using a window locator; once a popup window has been selected, all
|
630
|
+
commands go to that window. To select the main window again, use null
|
631
|
+
as the target.
|
632
|
+
|
633
|
+
<p>
|
634
|
+
|
635
|
+
Window locators provide different ways of specifying the window object:
|
636
|
+
by title, by internal JavaScript "name," or by JavaScript variable.
|
637
|
+
</p>
|
638
|
+
<ul>
|
639
|
+
<li><strong>title</strong>=<em>My Special Window</em>:
|
640
|
+
Finds the window using the text that appears in the title bar. Be careful;
|
641
|
+
two windows can share the same title. If that happens, this locator will
|
642
|
+
just pick one.
|
643
|
+
</li>
|
644
|
+
<li><strong>name</strong>=<em>myWindow</em>:
|
645
|
+
Finds the window using its internal JavaScript "name" property. This is the second
|
646
|
+
parameter "windowName" passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag)
|
647
|
+
(which Selenium intercepts).
|
648
|
+
</li>
|
649
|
+
<li><strong>var</strong>=<em>variableName</em>:
|
650
|
+
Some pop-up windows are unnamed (anonymous), but are associated with a JavaScript variable name in the current
|
651
|
+
application window, e.g. "window.foo = window.open(url);". In those cases, you can open the window using
|
652
|
+
"var=foo".
|
653
|
+
</li>
|
654
|
+
</ul>
|
655
|
+
<p>
|
656
|
+
If no window locator prefix is provided, we'll try to guess what you mean like this:</p>
|
657
|
+
<p>1.) if windowID is null, (or the string "null") then it is assumed the user is referring to the original window instantiated by the browser).</p>
|
658
|
+
<p>2.) if the value of the "windowID" parameter is a JavaScript variable name in the current application window, then it is assumed
|
659
|
+
that this variable contains the return value from a call to the JavaScript window.open() method.</p>
|
660
|
+
<p>3.) Otherwise, selenium looks in a hash it maintains that maps string names to window "names".</p>
|
661
|
+
<p>4.) If <em>that</em> fails, we'll try looping over all of the known windows to try to find the appropriate "title".
|
662
|
+
Since "title" is not necessarily unique, this may have unexpected behavior.</p>
|
663
|
+
|
664
|
+
<p>If you're having trouble figuring out the name of a window that you want to manipulate, look at the Selenium log messages
|
665
|
+
which identify the names of windows created via window.open (and therefore intercepted by Selenium). You will see messages
|
666
|
+
like the following for each window as it is opened:</p>
|
667
|
+
|
668
|
+
<p><code>debug: window.open call intercepted; window ID (which you can use with selectWindow()) is "myNewWindow"</code></p>
|
669
|
+
|
670
|
+
<p>In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example).
|
671
|
+
(This is bug SEL-339.) In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using
|
672
|
+
an empty (blank) url, like this: openWindow("", "myFunnyWindow").</p></comment>
|
673
|
+
|
674
|
+
</function>
|
675
|
+
|
676
|
+
<function name="selectFrame">
|
677
|
+
|
678
|
+
<param name="locator">an <a href="#locators">element locator</a> identifying a frame or iframe</param>
|
679
|
+
|
680
|
+
<comment>Selects a frame within the current window. (You may invoke this command
|
681
|
+
multiple times to select nested frames.) To select the parent frame, use
|
682
|
+
"relative=parent" as a locator; to select the top frame, use "relative=top".
|
683
|
+
You can also select a frame by its 0-based index number; select the first frame with
|
684
|
+
"index=0", or the third frame with "index=2".
|
685
|
+
|
686
|
+
<p>You may also use a DOM expression to identify the frame you want directly,
|
687
|
+
like this: <code>dom=frames["main"].frames["subframe"]</code></p></comment>
|
688
|
+
|
689
|
+
</function>
|
690
|
+
|
691
|
+
<function name="getWhetherThisFrameMatchFrameExpression">
|
692
|
+
|
693
|
+
<return type="boolean">true if the new frame is this code's window</return>
|
694
|
+
|
695
|
+
<param name="currentFrameString">starting frame</param>
|
696
|
+
|
697
|
+
<param name="target">new frame (which might be relative to the current one)</param>
|
698
|
+
|
699
|
+
<comment>Determine whether current/locator identify the frame containing this running code.
|
700
|
+
|
701
|
+
<p>This is useful in proxy injection mode, where this code runs in every
|
702
|
+
browser frame and window, and sometimes the selenium server needs to identify
|
703
|
+
the "current" frame. In this case, when the test calls selectFrame, this
|
704
|
+
routine is called for each frame to figure out which one has been selected.
|
705
|
+
The selected frame will return true, while all others will return false.</p></comment>
|
706
|
+
|
707
|
+
</function>
|
708
|
+
|
709
|
+
<function name="getWhetherThisWindowMatchWindowExpression">
|
710
|
+
|
711
|
+
<return type="boolean">true if the new window is this code's window</return>
|
712
|
+
|
713
|
+
<param name="currentWindowString">starting window</param>
|
714
|
+
|
715
|
+
<param name="target">new window (which might be relative to the current one, e.g., "_parent")</param>
|
716
|
+
|
717
|
+
<comment>Determine whether currentWindowString plus target identify the window containing this running code.
|
718
|
+
|
719
|
+
<p>This is useful in proxy injection mode, where this code runs in every
|
720
|
+
browser frame and window, and sometimes the selenium server needs to identify
|
721
|
+
the "current" window. In this case, when the test calls selectWindow, this
|
722
|
+
routine is called for each window to figure out which one has been selected.
|
723
|
+
The selected window will return true, while all others will return false.</p></comment>
|
724
|
+
|
725
|
+
</function>
|
726
|
+
|
727
|
+
<function name="waitForPopUp">
|
728
|
+
|
729
|
+
<param name="windowID">the JavaScript window "name" of the window that will appear (not the text of the title bar)</param>
|
730
|
+
|
731
|
+
<param name="timeout">a timeout in milliseconds, after which the action will return with an error</param>
|
732
|
+
|
733
|
+
<comment>Waits for a popup window to appear and load up.</comment>
|
734
|
+
|
735
|
+
</function>
|
736
|
+
|
737
|
+
<function name="chooseCancelOnNextConfirmation">
|
738
|
+
|
739
|
+
<comment><p>
|
740
|
+
By default, Selenium's overridden window.confirm() function will
|
741
|
+
return true, as if the user had manually clicked OK; after running
|
742
|
+
this command, the next call to confirm() will return false, as if
|
743
|
+
the user had clicked Cancel. Selenium will then resume using the
|
744
|
+
default behavior for future confirmations, automatically returning
|
745
|
+
true (OK) unless/until you explicitly call this command for each
|
746
|
+
confirmation.
|
747
|
+
</p>
|
748
|
+
<p>
|
749
|
+
Take note - every time a confirmation comes up, you must
|
750
|
+
consume it with a corresponding getConfirmation, or else
|
751
|
+
the next selenium operation will fail.
|
752
|
+
</p></comment>
|
753
|
+
|
754
|
+
</function>
|
755
|
+
|
756
|
+
<function name="chooseOkOnNextConfirmation">
|
757
|
+
|
758
|
+
<comment><p>
|
759
|
+
Undo the effect of calling chooseCancelOnNextConfirmation. Note
|
760
|
+
that Selenium's overridden window.confirm() function will normally automatically
|
761
|
+
return true, as if the user had manually clicked OK, so you shouldn't
|
762
|
+
need to use this command unless for some reason you need to change
|
763
|
+
your mind prior to the next confirmation. After any confirmation, Selenium will resume using the
|
764
|
+
default behavior for future confirmations, automatically returning
|
765
|
+
true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each
|
766
|
+
confirmation.
|
767
|
+
</p>
|
768
|
+
<p>
|
769
|
+
Take note - every time a confirmation comes up, you must
|
770
|
+
consume it with a corresponding getConfirmation, or else
|
771
|
+
the next selenium operation will fail.
|
772
|
+
</p></comment>
|
773
|
+
|
774
|
+
</function>
|
775
|
+
|
776
|
+
<function name="answerOnNextPrompt">
|
777
|
+
|
778
|
+
<param name="answer">the answer to give in response to the prompt pop-up</param>
|
779
|
+
|
780
|
+
<comment>Instructs Selenium to return the specified answer string in response to
|
781
|
+
the next JavaScript prompt [window.prompt()].</comment>
|
782
|
+
|
783
|
+
</function>
|
784
|
+
|
785
|
+
<function name="goBack">
|
786
|
+
|
787
|
+
<comment>Simulates the user clicking the "back" button on their browser.</comment>
|
788
|
+
|
789
|
+
</function>
|
790
|
+
|
791
|
+
<function name="refresh">
|
792
|
+
|
793
|
+
<comment>Simulates the user clicking the "Refresh" button on their browser.</comment>
|
794
|
+
|
795
|
+
</function>
|
796
|
+
|
797
|
+
<function name="close">
|
798
|
+
|
799
|
+
<comment>Simulates the user clicking the "close" button in the titlebar of a popup
|
800
|
+
window or tab.</comment>
|
801
|
+
|
802
|
+
</function>
|
803
|
+
|
804
|
+
<function name="isAlertPresent">
|
805
|
+
|
806
|
+
<return type="boolean">true if there is an alert</return>
|
807
|
+
|
808
|
+
<comment>Has an alert occurred?
|
809
|
+
|
810
|
+
<p>
|
811
|
+
This function never throws an exception
|
812
|
+
</p></comment>
|
813
|
+
|
814
|
+
</function>
|
815
|
+
|
816
|
+
<function name="isPromptPresent">
|
817
|
+
|
818
|
+
<return type="boolean">true if there is a pending prompt</return>
|
819
|
+
|
820
|
+
<comment>Has a prompt occurred?
|
821
|
+
|
822
|
+
<p>
|
823
|
+
This function never throws an exception
|
824
|
+
</p></comment>
|
825
|
+
|
826
|
+
</function>
|
827
|
+
|
828
|
+
<function name="isConfirmationPresent">
|
829
|
+
|
830
|
+
<return type="boolean">true if there is a pending confirmation</return>
|
831
|
+
|
832
|
+
<comment>Has confirm() been called?
|
833
|
+
|
834
|
+
<p>
|
835
|
+
This function never throws an exception
|
836
|
+
</p></comment>
|
837
|
+
|
838
|
+
</function>
|
839
|
+
|
840
|
+
<function name="getAlert">
|
841
|
+
|
842
|
+
<return type="string">The message of the most recent JavaScript alert</return>
|
843
|
+
|
844
|
+
<comment>Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
|
845
|
+
|
846
|
+
<p>Getting an alert has the same effect as manually clicking OK. If an
|
847
|
+
alert is generated but you do not consume it with getAlert, the next Selenium action
|
848
|
+
will fail.</p>
|
849
|
+
|
850
|
+
<p>Under Selenium, JavaScript alerts will NOT pop up a visible alert
|
851
|
+
dialog.</p>
|
852
|
+
|
853
|
+
<p>Selenium does NOT support JavaScript alerts that are generated in a
|
854
|
+
page's onload() event handler. In this case a visible dialog WILL be
|
855
|
+
generated and Selenium will hang until someone manually clicks OK.</p></comment>
|
856
|
+
|
857
|
+
</function>
|
858
|
+
|
859
|
+
<function name="getConfirmation">
|
860
|
+
|
861
|
+
<return type="string">the message of the most recent JavaScript confirmation dialog</return>
|
862
|
+
|
863
|
+
<comment>Retrieves the message of a JavaScript confirmation dialog generated during
|
864
|
+
the previous action.
|
865
|
+
|
866
|
+
<p>
|
867
|
+
By default, the confirm function will return true, having the same effect
|
868
|
+
as manually clicking OK. This can be changed by prior execution of the
|
869
|
+
chooseCancelOnNextConfirmation command.
|
870
|
+
</p>
|
871
|
+
<p>
|
872
|
+
If an confirmation is generated but you do not consume it with getConfirmation,
|
873
|
+
the next Selenium action will fail.
|
874
|
+
</p>
|
875
|
+
|
876
|
+
<p>
|
877
|
+
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible
|
878
|
+
dialog.
|
879
|
+
</p>
|
880
|
+
|
881
|
+
<p>
|
882
|
+
NOTE: Selenium does NOT support JavaScript confirmations that are
|
883
|
+
generated in a page's onload() event handler. In this case a visible
|
884
|
+
dialog WILL be generated and Selenium will hang until you manually click
|
885
|
+
OK.
|
886
|
+
</p></comment>
|
887
|
+
|
888
|
+
</function>
|
889
|
+
|
890
|
+
<function name="getPrompt">
|
891
|
+
|
892
|
+
<return type="string">the message of the most recent JavaScript question prompt</return>
|
893
|
+
|
894
|
+
<comment>Retrieves the message of a JavaScript question prompt dialog generated during
|
895
|
+
the previous action.
|
896
|
+
|
897
|
+
<p>Successful handling of the prompt requires prior execution of the
|
898
|
+
answerOnNextPrompt command. If a prompt is generated but you
|
899
|
+
do not get/verify it, the next Selenium action will fail.</p>
|
900
|
+
|
901
|
+
<p>NOTE: under Selenium, JavaScript prompts will NOT pop up a visible
|
902
|
+
dialog.</p>
|
903
|
+
|
904
|
+
<p>NOTE: Selenium does NOT support JavaScript prompts that are generated in a
|
905
|
+
page's onload() event handler. In this case a visible dialog WILL be
|
906
|
+
generated and Selenium will hang until someone manually clicks OK.</p></comment>
|
907
|
+
|
908
|
+
</function>
|
909
|
+
|
910
|
+
<function name="getLocation">
|
911
|
+
|
912
|
+
<return type="string">the absolute URL of the current page</return>
|
913
|
+
|
914
|
+
<comment>Gets the absolute URL of the current page.</comment>
|
915
|
+
|
916
|
+
</function>
|
917
|
+
|
918
|
+
<function name="getTitle">
|
919
|
+
|
920
|
+
<return type="string">the title of the current page</return>
|
921
|
+
|
922
|
+
<comment>Gets the title of the current page.</comment>
|
923
|
+
|
924
|
+
</function>
|
925
|
+
|
926
|
+
<function name="getBodyText">
|
927
|
+
|
928
|
+
<return type="string">the entire text of the page</return>
|
929
|
+
|
930
|
+
<comment>Gets the entire text of the page.</comment>
|
931
|
+
|
932
|
+
</function>
|
933
|
+
|
934
|
+
<function name="getValue">
|
935
|
+
|
936
|
+
<return type="string">the element value, or "on/off" for checkbox/radio elements</return>
|
937
|
+
|
938
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
939
|
+
|
940
|
+
<comment>Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
|
941
|
+
For checkbox/radio elements, the value will be "on" or "off" depending on
|
942
|
+
whether the element is checked or not.</comment>
|
943
|
+
|
944
|
+
</function>
|
945
|
+
|
946
|
+
<function name="getText">
|
947
|
+
|
948
|
+
<return type="string">the text of the element</return>
|
949
|
+
|
950
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
951
|
+
|
952
|
+
<comment>Gets the text of an element. This works for any element that contains
|
953
|
+
text. This command uses either the textContent (Mozilla-like browsers) or
|
954
|
+
the innerText (IE-like browsers) of the element, which is the rendered
|
955
|
+
text shown to the user.</comment>
|
956
|
+
|
957
|
+
</function>
|
958
|
+
|
959
|
+
<function name="highlight">
|
960
|
+
|
961
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
962
|
+
|
963
|
+
<comment>Briefly changes the backgroundColor of the specified element yellow. Useful for debugging.</comment>
|
964
|
+
|
965
|
+
</function>
|
966
|
+
|
967
|
+
<function name="getEval">
|
968
|
+
|
969
|
+
<return type="string">the results of evaluating the snippet</return>
|
970
|
+
|
971
|
+
<param name="script">the JavaScript snippet to run</param>
|
972
|
+
|
973
|
+
<comment>Gets the result of evaluating the specified JavaScript snippet. The snippet may
|
974
|
+
have multiple lines, but only the result of the last line will be returned.
|
975
|
+
|
976
|
+
<p>Note that, by default, the snippet will run in the context of the "selenium"
|
977
|
+
object itself, so <code>this</code> will refer to the Selenium object. Use <code>window</code> to
|
978
|
+
refer to the window of your application, e.g. <code>window.document.getElementById('foo')</code></p>
|
979
|
+
|
980
|
+
<p>If you need to use
|
981
|
+
a locator to refer to a single element in your application page, you can
|
982
|
+
use <code>this.browserbot.findElement("id=foo")</code> where "id=foo" is your locator.</p></comment>
|
983
|
+
|
984
|
+
</function>
|
985
|
+
|
986
|
+
<function name="isChecked">
|
987
|
+
|
988
|
+
<return type="boolean">true if the checkbox is checked, false otherwise</return>
|
989
|
+
|
990
|
+
<param name="locator">an <a href="#locators">element locator</a> pointing to a checkbox or radio button</param>
|
991
|
+
|
992
|
+
<comment>Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button.</comment>
|
993
|
+
|
994
|
+
</function>
|
995
|
+
|
996
|
+
<function name="getTable">
|
997
|
+
|
998
|
+
<return type="string">the text from the specified cell</return>
|
999
|
+
|
1000
|
+
<param name="tableCellAddress">a cell address, e.g. "foo.1.4"</param>
|
1001
|
+
|
1002
|
+
<comment>Gets the text from a cell of a table. The cellAddress syntax
|
1003
|
+
tableLocator.row.column, where row and column start at 0.</comment>
|
1004
|
+
|
1005
|
+
</function>
|
1006
|
+
|
1007
|
+
<function name="getSelectedLabels">
|
1008
|
+
|
1009
|
+
<return type="string[]">an array of all selected option labels in the specified select drop-down</return>
|
1010
|
+
|
1011
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1012
|
+
|
1013
|
+
<comment>Gets all option labels (visible text) for selected options in the specified select or multi-select element.</comment>
|
1014
|
+
|
1015
|
+
</function>
|
1016
|
+
|
1017
|
+
<function name="getSelectedLabel">
|
1018
|
+
|
1019
|
+
<return type="string">the selected option label in the specified select drop-down</return>
|
1020
|
+
|
1021
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1022
|
+
|
1023
|
+
<comment>Gets option label (visible text) for selected option in the specified select element.</comment>
|
1024
|
+
|
1025
|
+
</function>
|
1026
|
+
|
1027
|
+
<function name="getSelectedValues">
|
1028
|
+
|
1029
|
+
<return type="string[]">an array of all selected option values in the specified select drop-down</return>
|
1030
|
+
|
1031
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1032
|
+
|
1033
|
+
<comment>Gets all option values (value attributes) for selected options in the specified select or multi-select element.</comment>
|
1034
|
+
|
1035
|
+
</function>
|
1036
|
+
|
1037
|
+
<function name="getSelectedValue">
|
1038
|
+
|
1039
|
+
<return type="string">the selected option value in the specified select drop-down</return>
|
1040
|
+
|
1041
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1042
|
+
|
1043
|
+
<comment>Gets option value (value attribute) for selected option in the specified select element.</comment>
|
1044
|
+
|
1045
|
+
</function>
|
1046
|
+
|
1047
|
+
<function name="getSelectedIndexes">
|
1048
|
+
|
1049
|
+
<return type="string[]">an array of all selected option indexes in the specified select drop-down</return>
|
1050
|
+
|
1051
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1052
|
+
|
1053
|
+
<comment>Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.</comment>
|
1054
|
+
|
1055
|
+
</function>
|
1056
|
+
|
1057
|
+
<function name="getSelectedIndex">
|
1058
|
+
|
1059
|
+
<return type="string">the selected option index in the specified select drop-down</return>
|
1060
|
+
|
1061
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1062
|
+
|
1063
|
+
<comment>Gets option index (option number, starting at 0) for selected option in the specified select element.</comment>
|
1064
|
+
|
1065
|
+
</function>
|
1066
|
+
|
1067
|
+
<function name="getSelectedIds">
|
1068
|
+
|
1069
|
+
<return type="string[]">an array of all selected option IDs in the specified select drop-down</return>
|
1070
|
+
|
1071
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1072
|
+
|
1073
|
+
<comment>Gets all option element IDs for selected options in the specified select or multi-select element.</comment>
|
1074
|
+
|
1075
|
+
</function>
|
1076
|
+
|
1077
|
+
<function name="getSelectedId">
|
1078
|
+
|
1079
|
+
<return type="string">the selected option ID in the specified select drop-down</return>
|
1080
|
+
|
1081
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1082
|
+
|
1083
|
+
<comment>Gets option element ID for selected option in the specified select element.</comment>
|
1084
|
+
|
1085
|
+
</function>
|
1086
|
+
|
1087
|
+
<function name="isSomethingSelected">
|
1088
|
+
|
1089
|
+
<return type="boolean">true if some option has been selected, false otherwise</return>
|
1090
|
+
|
1091
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1092
|
+
|
1093
|
+
<comment>Determines whether some option in a drop-down menu is selected.</comment>
|
1094
|
+
|
1095
|
+
</function>
|
1096
|
+
|
1097
|
+
<function name="getSelectOptions">
|
1098
|
+
|
1099
|
+
<return type="string[]">an array of all option labels in the specified select drop-down</return>
|
1100
|
+
|
1101
|
+
<param name="selectLocator">an <a href="#locators">element locator</a> identifying a drop-down menu</param>
|
1102
|
+
|
1103
|
+
<comment>Gets all option labels in the specified select drop-down.</comment>
|
1104
|
+
|
1105
|
+
</function>
|
1106
|
+
|
1107
|
+
<function name="getAttribute">
|
1108
|
+
|
1109
|
+
<return type="string">the value of the specified attribute</return>
|
1110
|
+
|
1111
|
+
<param name="attributeLocator">an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"</param>
|
1112
|
+
|
1113
|
+
<comment>Gets the value of an element attribute. The value of the attribute may
|
1114
|
+
differ across browsers (this is the case for the "style" attribute, for
|
1115
|
+
example).</comment>
|
1116
|
+
|
1117
|
+
</function>
|
1118
|
+
|
1119
|
+
<function name="isTextPresent">
|
1120
|
+
|
1121
|
+
<return type="boolean">true if the pattern matches the text, false otherwise</return>
|
1122
|
+
|
1123
|
+
<param name="pattern">a <a href="#patterns">pattern</a> to match with the text of the page</param>
|
1124
|
+
|
1125
|
+
<comment>Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.</comment>
|
1126
|
+
|
1127
|
+
</function>
|
1128
|
+
|
1129
|
+
<function name="isElementPresent">
|
1130
|
+
|
1131
|
+
<return type="boolean">true if the element is present, false otherwise</return>
|
1132
|
+
|
1133
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
1134
|
+
|
1135
|
+
<comment>Verifies that the specified element is somewhere on the page.</comment>
|
1136
|
+
|
1137
|
+
</function>
|
1138
|
+
|
1139
|
+
<function name="isVisible">
|
1140
|
+
|
1141
|
+
<return type="boolean">true if the specified element is visible, false otherwise</return>
|
1142
|
+
|
1143
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
1144
|
+
|
1145
|
+
<comment>Determines if the specified element is visible. An
|
1146
|
+
element can be rendered invisible by setting the CSS "visibility"
|
1147
|
+
property to "hidden", or the "display" property to "none", either for the
|
1148
|
+
element itself or one if its ancestors. This method will fail if
|
1149
|
+
the element is not present.</comment>
|
1150
|
+
|
1151
|
+
</function>
|
1152
|
+
|
1153
|
+
<function name="isEditable">
|
1154
|
+
|
1155
|
+
<return type="boolean">true if the input element is editable, false otherwise</return>
|
1156
|
+
|
1157
|
+
<param name="locator">an <a href="#locators">element locator</a></param>
|
1158
|
+
|
1159
|
+
<comment>Determines whether the specified input element is editable, ie hasn't been disabled.
|
1160
|
+
This method will fail if the specified element isn't an input element.</comment>
|
1161
|
+
|
1162
|
+
</function>
|
1163
|
+
|
1164
|
+
<function name="getAllButtons">
|
1165
|
+
|
1166
|
+
<return type="string[]">the IDs of all buttons on the page</return>
|
1167
|
+
|
1168
|
+
<comment>Returns the IDs of all buttons on the page.
|
1169
|
+
|
1170
|
+
<p>If a given button has no ID, it will appear as "" in this array.</p></comment>
|
1171
|
+
|
1172
|
+
</function>
|
1173
|
+
|
1174
|
+
<function name="getAllLinks">
|
1175
|
+
|
1176
|
+
<return type="string[]">the IDs of all links on the page</return>
|
1177
|
+
|
1178
|
+
<comment>Returns the IDs of all links on the page.
|
1179
|
+
|
1180
|
+
<p>If a given link has no ID, it will appear as "" in this array.</p></comment>
|
1181
|
+
|
1182
|
+
</function>
|
1183
|
+
|
1184
|
+
<function name="getAllFields">
|
1185
|
+
|
1186
|
+
<return type="string[]">the IDs of all field on the page</return>
|
1187
|
+
|
1188
|
+
<comment>Returns the IDs of all input fields on the page.
|
1189
|
+
|
1190
|
+
<p>If a given field has no ID, it will appear as "" in this array.</p></comment>
|
1191
|
+
|
1192
|
+
</function>
|
1193
|
+
|
1194
|
+
<function name="getAttributeFromAllWindows">
|
1195
|
+
|
1196
|
+
<return type="string[]">the set of values of this attribute from all known windows.</return>
|
1197
|
+
|
1198
|
+
<param name="attributeName">name of an attribute on the windows</param>
|
1199
|
+
|
1200
|
+
<comment>Returns every instance of some attribute from all known windows.</comment>
|
1201
|
+
|
1202
|
+
</function>
|
1203
|
+
|
1204
|
+
<function name="dragdrop">
|
1205
|
+
|
1206
|
+
<param name="locator">an element locator</param>
|
1207
|
+
|
1208
|
+
<param name="movementsString">offset in pixels from the current location to which the element should be moved, e.g., "+70,-300"</param>
|
1209
|
+
|
1210
|
+
<comment>deprecated - use dragAndDrop instead</comment>
|
1211
|
+
|
1212
|
+
</function>
|
1213
|
+
|
1214
|
+
<function name="setMouseSpeed">
|
1215
|
+
|
1216
|
+
<param name="pixels">the number of pixels between "mousemove" events</param>
|
1217
|
+
|
1218
|
+
<comment>Configure the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
|
1219
|
+
<p>Setting this value to 0 means that we'll send a "mousemove" event to every single pixel
|
1220
|
+
in between the start location and the end location; that can be very slow, and may
|
1221
|
+
cause some browsers to force the JavaScript to timeout.</p>
|
1222
|
+
|
1223
|
+
<p>If the mouse speed is greater than the distance between the two dragged objects, we'll
|
1224
|
+
just send one "mousemove" at the start location and then one final one at the end location.</p></comment>
|
1225
|
+
|
1226
|
+
</function>
|
1227
|
+
|
1228
|
+
<function name="getMouseSpeed">
|
1229
|
+
|
1230
|
+
<return type="number">the number of pixels between "mousemove" events during dragAndDrop commands (default=10)</return>
|
1231
|
+
|
1232
|
+
<comment>Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).</comment>
|
1233
|
+
|
1234
|
+
</function>
|
1235
|
+
|
1236
|
+
<function name="dragAndDrop">
|
1237
|
+
|
1238
|
+
<param name="locator">an element locator</param>
|
1239
|
+
|
1240
|
+
<param name="movementsString">offset in pixels from the current location to which the element should be moved, e.g., "+70,-300"</param>
|
1241
|
+
|
1242
|
+
<comment>Drags an element a certain distance and then drops it</comment>
|
1243
|
+
|
1244
|
+
</function>
|
1245
|
+
|
1246
|
+
<function name="dragAndDropToObject">
|
1247
|
+
|
1248
|
+
<param name="locatorOfObjectToBeDragged">an element to be dragged</param>
|
1249
|
+
|
1250
|
+
<param name="locatorOfDragDestinationObject">an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped</param>
|
1251
|
+
|
1252
|
+
<comment>Drags an element and drops it on another element</comment>
|
1253
|
+
|
1254
|
+
</function>
|
1255
|
+
|
1256
|
+
<function name="windowFocus">
|
1257
|
+
|
1258
|
+
<comment>Gives focus to the currently selected window</comment>
|
1259
|
+
|
1260
|
+
</function>
|
1261
|
+
|
1262
|
+
<function name="windowMaximize">
|
1263
|
+
|
1264
|
+
<comment>Resize currently selected window to take up the entire screen</comment>
|
1265
|
+
|
1266
|
+
</function>
|
1267
|
+
|
1268
|
+
<function name="getAllWindowIds">
|
1269
|
+
|
1270
|
+
<return type="string[]">the IDs of all windows that the browser knows about.</return>
|
1271
|
+
|
1272
|
+
<comment>Returns the IDs of all windows that the browser knows about.</comment>
|
1273
|
+
|
1274
|
+
</function>
|
1275
|
+
|
1276
|
+
<function name="getAllWindowNames">
|
1277
|
+
|
1278
|
+
<return type="string[]">the names of all windows that the browser knows about.</return>
|
1279
|
+
|
1280
|
+
<comment>Returns the names of all windows that the browser knows about.</comment>
|
1281
|
+
|
1282
|
+
</function>
|
1283
|
+
|
1284
|
+
<function name="getAllWindowTitles">
|
1285
|
+
|
1286
|
+
<return type="string[]">the titles of all windows that the browser knows about.</return>
|
1287
|
+
|
1288
|
+
<comment>Returns the titles of all windows that the browser knows about.</comment>
|
1289
|
+
|
1290
|
+
</function>
|
1291
|
+
|
1292
|
+
<function name="getHtmlSource">
|
1293
|
+
|
1294
|
+
<return type="string">the entire HTML source</return>
|
1295
|
+
|
1296
|
+
<comment>Returns the entire HTML source between the opening and
|
1297
|
+
closing "html" tags.</comment>
|
1298
|
+
|
1299
|
+
</function>
|
1300
|
+
|
1301
|
+
<function name="setCursorPosition">
|
1302
|
+
|
1303
|
+
<param name="locator">an <a href="#locators">element locator</a> pointing to an input element or textarea</param>
|
1304
|
+
|
1305
|
+
<param name="position">the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field.</param>
|
1306
|
+
|
1307
|
+
<comment>Moves the text cursor to the specified position in the given input element or textarea.
|
1308
|
+
This method will fail if the specified element isn't an input element or textarea.</comment>
|
1309
|
+
|
1310
|
+
</function>
|
1311
|
+
|
1312
|
+
<function name="getElementIndex">
|
1313
|
+
|
1314
|
+
<return type="number">of relative index of the element to its parent (starting from 0)</return>
|
1315
|
+
|
1316
|
+
<param name="locator">an <a href="#locators">element locator</a> pointing to an element</param>
|
1317
|
+
|
1318
|
+
<comment>Get the relative index of an element to its parent (starting from 0). The comment node and empty text node
|
1319
|
+
will be ignored.</comment>
|
1320
|
+
|
1321
|
+
</function>
|
1322
|
+
|
1323
|
+
<function name="isOrdered">
|
1324
|
+
|
1325
|
+
<return type="boolean">true if element1 is the previous sibling of element2, false otherwise</return>
|
1326
|
+
|
1327
|
+
<param name="locator1">an <a href="#locators">element locator</a> pointing to the first element</param>
|
1328
|
+
|
1329
|
+
<param name="locator2">an <a href="#locators">element locator</a> pointing to the second element</param>
|
1330
|
+
|
1331
|
+
<comment>Check if these two elements have same parent and are ordered siblings in the DOM. Two same elements will
|
1332
|
+
not be considered ordered.</comment>
|
1333
|
+
|
1334
|
+
</function>
|
1335
|
+
|
1336
|
+
<function name="getElementPositionLeft">
|
1337
|
+
|
1338
|
+
<return type="number">of pixels from the edge of the frame.</return>
|
1339
|
+
|
1340
|
+
<param name="locator">an <a href="#locators">element locator</a> pointing to an element OR an element itself</param>
|
1341
|
+
|
1342
|
+
<comment>Retrieves the horizontal position of an element</comment>
|
1343
|
+
|
1344
|
+
</function>
|
1345
|
+
|
1346
|
+
<function name="getElementPositionTop">
|
1347
|
+
|
1348
|
+
<return type="number">of pixels from the edge of the frame.</return>
|
1349
|
+
|
1350
|
+
<param name="locator">an <a href="#locators">element locator</a> pointing to an element OR an element itself</param>
|
1351
|
+
|
1352
|
+
<comment>Retrieves the vertical position of an element</comment>
|
1353
|
+
|
1354
|
+
</function>
|
1355
|
+
|
1356
|
+
<function name="getElementWidth">
|
1357
|
+
|
1358
|
+
<return type="number">width of an element in pixels</return>
|
1359
|
+
|
1360
|
+
<param name="locator">an <a href="#locators">element locator</a> pointing to an element</param>
|
1361
|
+
|
1362
|
+
<comment>Retrieves the width of an element</comment>
|
1363
|
+
|
1364
|
+
</function>
|
1365
|
+
|
1366
|
+
<function name="getElementHeight">
|
1367
|
+
|
1368
|
+
<return type="number">height of an element in pixels</return>
|
1369
|
+
|
1370
|
+
<param name="locator">an <a href="#locators">element locator</a> pointing to an element</param>
|
1371
|
+
|
1372
|
+
<comment>Retrieves the height of an element</comment>
|
1373
|
+
|
1374
|
+
</function>
|
1375
|
+
|
1376
|
+
<function name="getCursorPosition">
|
1377
|
+
|
1378
|
+
<return type="number">the numerical position of the cursor in the field</return>
|
1379
|
+
|
1380
|
+
<param name="locator">an <a href="#locators">element locator</a> pointing to an input element or textarea</param>
|
1381
|
+
|
1382
|
+
<comment>Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
|
1383
|
+
|
1384
|
+
<p>Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to
|
1385
|
+
return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as <a href="http://jira.openqa.org/browse/SEL-243">SEL-243</a>.</p>
|
1386
|
+
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.</comment>
|
1387
|
+
|
1388
|
+
</function>
|
1389
|
+
|
1390
|
+
<function name="getExpression">
|
1391
|
+
|
1392
|
+
<return type="string">the value passed in</return>
|
1393
|
+
|
1394
|
+
<param name="expression">the value to return</param>
|
1395
|
+
|
1396
|
+
<comment>Returns the specified expression.
|
1397
|
+
|
1398
|
+
<p>This is useful because of JavaScript preprocessing.
|
1399
|
+
It is used to generate commands like assertExpression and waitForExpression.</p></comment>
|
1400
|
+
|
1401
|
+
</function>
|
1402
|
+
|
1403
|
+
<function name="getXpathCount">
|
1404
|
+
|
1405
|
+
<return type="number">the number of nodes that match the specified xpath</return>
|
1406
|
+
|
1407
|
+
<param name="xpath">the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.</param>
|
1408
|
+
|
1409
|
+
<comment>Returns the number of nodes that match the specified xpath, eg. "//table" would give
|
1410
|
+
the number of tables.</comment>
|
1411
|
+
|
1412
|
+
</function>
|
1413
|
+
|
1414
|
+
<function name="assignId">
|
1415
|
+
|
1416
|
+
<param name="locator">an <a href="#locators">element locator</a> pointing to an element</param>
|
1417
|
+
|
1418
|
+
<param name="identifier">a string to be used as the ID of the specified element</param>
|
1419
|
+
|
1420
|
+
<comment>Temporarily sets the "id" attribute of the specified element, so you can locate it in the future
|
1421
|
+
using its ID rather than a slow/complicated XPath. This ID will disappear once the page is
|
1422
|
+
reloaded.</comment>
|
1423
|
+
|
1424
|
+
</function>
|
1425
|
+
|
1426
|
+
<function name="allowNativeXpath">
|
1427
|
+
|
1428
|
+
<param name="allow">boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath</param>
|
1429
|
+
|
1430
|
+
<comment>Specifies whether Selenium should use the native in-browser implementation
|
1431
|
+
of XPath (if any native version is available); if you pass "false" to
|
1432
|
+
this function, we will always use our pure-JavaScript xpath library.
|
1433
|
+
Using the pure-JS xpath library can improve the consistency of xpath
|
1434
|
+
element locators between different browser vendors, but the pure-JS
|
1435
|
+
version is much slower than the native implementations.</comment>
|
1436
|
+
|
1437
|
+
</function>
|
1438
|
+
|
1439
|
+
<function name="ignoreAttributesWithoutValue">
|
1440
|
+
|
1441
|
+
<param name="ignore">boolean, true means we'll ignore attributes without value at the expense of xpath "correctness"; false means we'll sacrifice speed for correctness.</param>
|
1442
|
+
|
1443
|
+
<comment>Specifies whether Selenium will ignore xpath attributes that have no
|
1444
|
+
value, i.e. are the empty string, when using the non-native xpath
|
1445
|
+
evaluation engine. You'd want to do this for performance reasons in IE.
|
1446
|
+
However, this could break certain xpaths, for example an xpath that looks
|
1447
|
+
for an attribute whose value is NOT the empty string.
|
1448
|
+
|
1449
|
+
The hope is that such xpaths are relatively rare, but the user should
|
1450
|
+
have the option of using them. Note that this only influences xpath
|
1451
|
+
evaluation when using the ajaxslt engine (i.e. not "javascript-xpath").</comment>
|
1452
|
+
|
1453
|
+
</function>
|
1454
|
+
|
1455
|
+
<function name="waitForCondition">
|
1456
|
+
|
1457
|
+
<param name="script">the JavaScript snippet to run</param>
|
1458
|
+
|
1459
|
+
<param name="timeout">a timeout in milliseconds, after which this command will return with an error</param>
|
1460
|
+
|
1461
|
+
<comment>Runs the specified JavaScript snippet repeatedly until it evaluates to "true".
|
1462
|
+
The snippet may have multiple lines, but only the result of the last line
|
1463
|
+
will be considered.
|
1464
|
+
|
1465
|
+
<p>Note that, by default, the snippet will be run in the runner's test window, not in the window
|
1466
|
+
of your application. To get the window of your application, you can use
|
1467
|
+
the JavaScript snippet <code>selenium.browserbot.getCurrentWindow()</code>, and then
|
1468
|
+
run your JavaScript in there</p></comment>
|
1469
|
+
|
1470
|
+
</function>
|
1471
|
+
|
1472
|
+
<function name="setTimeout">
|
1473
|
+
|
1474
|
+
<param name="timeout">a timeout in milliseconds, after which the action will return with an error</param>
|
1475
|
+
|
1476
|
+
<comment>Specifies the amount of time that Selenium will wait for actions to complete.
|
1477
|
+
|
1478
|
+
<p>Actions that require waiting include "open" and the "waitFor*" actions.</p>
|
1479
|
+
The default timeout is 30 seconds.</comment>
|
1480
|
+
|
1481
|
+
</function>
|
1482
|
+
|
1483
|
+
<function name="waitForPageToLoad">
|
1484
|
+
|
1485
|
+
<param name="timeout">a timeout in milliseconds, after which this command will return with an error</param>
|
1486
|
+
|
1487
|
+
<comment>Waits for a new page to load.
|
1488
|
+
|
1489
|
+
<p>You can use this command instead of the "AndWait" suffixes, "clickAndWait", "selectAndWait", "typeAndWait" etc.
|
1490
|
+
(which are only available in the JS API).</p>
|
1491
|
+
|
1492
|
+
<p>Selenium constantly keeps track of new pages loading, and sets a "newPageLoaded"
|
1493
|
+
flag when it first notices a page load. Running any other Selenium command after
|
1494
|
+
turns the flag to false. Hence, if you want to wait for a page to load, you must
|
1495
|
+
wait immediately after a Selenium command that caused a page-load.</p></comment>
|
1496
|
+
|
1497
|
+
</function>
|
1498
|
+
|
1499
|
+
<function name="waitForFrameToLoad">
|
1500
|
+
|
1501
|
+
<param name="frameAddress">FrameAddress from the server side</param>
|
1502
|
+
|
1503
|
+
<param name="timeout">a timeout in milliseconds, after which this command will return with an error</param>
|
1504
|
+
|
1505
|
+
<comment>Waits for a new frame to load.
|
1506
|
+
|
1507
|
+
<p>Selenium constantly keeps track of new pages and frames loading,
|
1508
|
+
and sets a "newPageLoaded" flag when it first notices a page load.</p>
|
1509
|
+
|
1510
|
+
See waitForPageToLoad for more information.</comment>
|
1511
|
+
|
1512
|
+
</function>
|
1513
|
+
|
1514
|
+
<function name="getCookie">
|
1515
|
+
|
1516
|
+
<return type="string">all cookies of the current page under test</return>
|
1517
|
+
|
1518
|
+
<comment>Return all cookies of the current page under test.</comment>
|
1519
|
+
|
1520
|
+
</function>
|
1521
|
+
|
1522
|
+
<function name="getCookieByName">
|
1523
|
+
|
1524
|
+
<return type="string">the value of the cookie</return>
|
1525
|
+
|
1526
|
+
<param name="name">the name of the cookie</param>
|
1527
|
+
|
1528
|
+
<comment>Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.</comment>
|
1529
|
+
|
1530
|
+
</function>
|
1531
|
+
|
1532
|
+
<function name="isCookiePresent">
|
1533
|
+
|
1534
|
+
<return type="boolean">true if a cookie with the specified name is present, or false otherwise.</return>
|
1535
|
+
|
1536
|
+
<param name="name">the name of the cookie</param>
|
1537
|
+
|
1538
|
+
<comment>Returns true if a cookie with the specified name is present, or false otherwise.</comment>
|
1539
|
+
|
1540
|
+
</function>
|
1541
|
+
|
1542
|
+
<function name="createCookie">
|
1543
|
+
|
1544
|
+
<param name="nameValuePair">name and value of the cookie in a format "name=value"</param>
|
1545
|
+
|
1546
|
+
<param name="optionsString">options for the cookie. Currently supported options include 'path', 'max_age' and 'domain'. the optionsString's format is "path=/path/, max_age=60, domain=.foo.com". The order of options are irrelevant, the unit of the value of 'max_age' is second. Note that specifying a domain that isn't a subset of the current domain will usually fail.</param>
|
1547
|
+
|
1548
|
+
<comment>Create a new cookie whose path and domain are same with those of current page
|
1549
|
+
under test, unless you specified a path for this cookie explicitly.</comment>
|
1550
|
+
|
1551
|
+
</function>
|
1552
|
+
|
1553
|
+
<function name="deleteCookie">
|
1554
|
+
|
1555
|
+
<param name="name">the name of the cookie to be deleted</param>
|
1556
|
+
|
1557
|
+
<param name="optionsString">options for the cookie. Currently supported options include 'path', 'domain' and 'recurse.' The optionsString's format is "path=/path/, domain=.foo.com, recurse=true". The order of options are irrelevant. Note that specifying a domain that isn't a subset of the current domain will usually fail.</param>
|
1558
|
+
|
1559
|
+
<comment>Delete a named cookie with specified path and domain. Be careful; to delete a cookie, you
|
1560
|
+
need to delete it using the exact same path and domain that were used to create the cookie.
|
1561
|
+
If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. Also
|
1562
|
+
note that specifying a domain that isn't a subset of the current domain will usually fail.
|
1563
|
+
|
1564
|
+
Since there's no way to discover at runtime the original path and domain of a given cookie,
|
1565
|
+
we've added an option called 'recurse' to try all sub-domains of the current domain with
|
1566
|
+
all paths that are a subset of the current path. Beware; this option can be slow. In
|
1567
|
+
big-O notation, it operates in O(n*m) time, where n is the number of dots in the domain
|
1568
|
+
name and m is the number of slashes in the path.</comment>
|
1569
|
+
|
1570
|
+
</function>
|
1571
|
+
|
1572
|
+
<function name="deleteAllVisibleCookies">
|
1573
|
+
|
1574
|
+
<comment>Calls deleteCookie with recurse=true on all cookies visible to the current page.
|
1575
|
+
As noted on the documentation for deleteCookie, recurse=true can be much slower
|
1576
|
+
than simply deleting the cookies using a known domain/path.</comment>
|
1577
|
+
|
1578
|
+
</function>
|
1579
|
+
|
1580
|
+
<function name="setBrowserLogLevel">
|
1581
|
+
|
1582
|
+
<param name="logLevel">one of the following: "debug", "info", "warn", "error" or "off"</param>
|
1583
|
+
|
1584
|
+
<comment>Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded.
|
1585
|
+
Valid logLevel strings are: "debug", "info", "warn", "error" or "off".
|
1586
|
+
To see the browser logs, you need to
|
1587
|
+
either show the log window in GUI mode, or enable browser-side logging in Selenium RC.</comment>
|
1588
|
+
|
1589
|
+
</function>
|
1590
|
+
|
1591
|
+
<function name="runScript">
|
1592
|
+
|
1593
|
+
<param name="script">the JavaScript snippet to run</param>
|
1594
|
+
|
1595
|
+
<comment>Creates a new "script" tag in the body of the current test window, and
|
1596
|
+
adds the specified text into the body of the command. Scripts run in
|
1597
|
+
this way can often be debugged more easily than scripts executed using
|
1598
|
+
Selenium's "getEval" command. Beware that JS exceptions thrown in these script
|
1599
|
+
tags aren't managed by Selenium, so you should probably wrap your script
|
1600
|
+
in try/catch blocks if there is any chance that the script will throw
|
1601
|
+
an exception.</comment>
|
1602
|
+
|
1603
|
+
</function>
|
1604
|
+
|
1605
|
+
<function name="addLocationStrategy">
|
1606
|
+
|
1607
|
+
<param name="strategyName">the name of the strategy to define; this should use only letters [a-zA-Z] with no spaces or other punctuation.</param>
|
1608
|
+
|
1609
|
+
<param name="functionDefinition">a string defining the body of a function in JavaScript. For example: <code>return inDocument.getElementById(locator);</code></param>
|
1610
|
+
|
1611
|
+
<comment>Defines a new function for Selenium to locate elements on the page.
|
1612
|
+
For example,
|
1613
|
+
if you define the strategy "foo", and someone runs click("foo=blah"), we'll
|
1614
|
+
run your function, passing you the string "blah", and click on the element
|
1615
|
+
that your function
|
1616
|
+
returns, or throw an "Element not found" error if your function returns null.
|
1617
|
+
|
1618
|
+
We'll pass three arguments to your function:
|
1619
|
+
<ul>
|
1620
|
+
<li>locator: the string the user passed in</li>
|
1621
|
+
<li>inWindow: the currently selected window</li>
|
1622
|
+
<li>inDocument: the currently selected document</li>
|
1623
|
+
</ul>
|
1624
|
+
The function must return null if the element can't be found.</comment>
|
1625
|
+
|
1626
|
+
</function>
|
1627
|
+
|
1628
|
+
<function name="captureEntirePageScreenshot">
|
1629
|
+
|
1630
|
+
<param name="filename">the path to the file to persist the screenshot as. No filename extension will be appended by default. Directories will not be created if they do not exist, and an exception will be thrown, possibly by native code.</param>
|
1631
|
+
|
1632
|
+
<param name="kwargs">a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options: <dl> <dt>background</dt> <dd>the background CSS for the HTML document. This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text).</dd> </dl></param>
|
1633
|
+
|
1634
|
+
<comment>Saves the entire contents of the current window canvas to a PNG file.
|
1635
|
+
Contrast this with the captureScreenshot command, which captures the
|
1636
|
+
contents of the OS viewport (i.e. whatever is currently being displayed
|
1637
|
+
on the monitor), and is implemented in the RC only. Currently this only
|
1638
|
+
works in Firefox when running in chrome mode, and in IE non-HTA using
|
1639
|
+
the EXPERIMENTAL "Snapsie" utility. The Firefox implementation is mostly
|
1640
|
+
borrowed from the Screengrab! Firefox extension. Please see
|
1641
|
+
http://www.screengrab.org and http://snapsie.sourceforge.net/ for
|
1642
|
+
details.</comment>
|
1643
|
+
|
1644
|
+
</function>
|
1645
|
+
|
1646
|
+
<function name="rollup">
|
1647
|
+
|
1648
|
+
<param name="rollupName">the name of the rollup command</param>
|
1649
|
+
|
1650
|
+
<param name="kwargs">keyword arguments string that influences how the rollup expands into commands</param>
|
1651
|
+
|
1652
|
+
<comment>Executes a command rollup, which is a series of commands with a unique
|
1653
|
+
name, and optionally arguments that control the generation of the set of
|
1654
|
+
commands. If any one of the rolled-up commands fails, the rollup is
|
1655
|
+
considered to have failed. Rollups may also contain nested rollups.</comment>
|
1656
|
+
|
1657
|
+
</function>
|
1658
|
+
|
1659
|
+
<function name="addScript">
|
1660
|
+
|
1661
|
+
<param name="scriptContent">the Javascript content of the script to add</param>
|
1662
|
+
|
1663
|
+
<param name="scriptTagId">(optional) the id of the new script tag. If specified, and an element with this id already exists, this operation will fail.</param>
|
1664
|
+
|
1665
|
+
<comment>Loads script content into a new script tag in the Selenium document. This
|
1666
|
+
differs from the runScript command in that runScript adds the script tag
|
1667
|
+
to the document of the AUT, not the Selenium document. The following
|
1668
|
+
entities in the script content are replaced by the characters they
|
1669
|
+
represent:
|
1670
|
+
|
1671
|
+
<
|
1672
|
+
>
|
1673
|
+
&
|
1674
|
+
|
1675
|
+
The corresponding remove command is removeScript.</comment>
|
1676
|
+
|
1677
|
+
</function>
|
1678
|
+
|
1679
|
+
<function name="removeScript">
|
1680
|
+
|
1681
|
+
<param name="scriptTagId">the id of the script element to remove.</param>
|
1682
|
+
|
1683
|
+
<comment>Removes a script tag from the Selenium document identified by the given
|
1684
|
+
id. Does nothing if the referenced tag doesn't exist.</comment>
|
1685
|
+
|
1686
|
+
</function>
|
1687
|
+
|
1688
|
+
<function name="useXpathLibrary">
|
1689
|
+
|
1690
|
+
<param name="libraryName">name of the desired library Only the following three can be chosen: ajaxslt - Google's library javascript - Cybozu Labs' faster library default - The default library. Currently the default library is ajaxslt. If libraryName isn't one of these three, then no change will be made.</param>
|
1691
|
+
|
1692
|
+
<comment>Allows choice of one of the available libraries.</comment>
|
1693
|
+
|
1694
|
+
</function>
|
1695
|
+
|
1696
|
+
<function name="setContext">
|
1697
|
+
|
1698
|
+
<param name="context">the message to be sent to the browser</param>
|
1699
|
+
|
1700
|
+
<comment>Writes a message to the status bar and adds a note to the browser-side
|
1701
|
+
log.</comment>
|
1702
|
+
|
1703
|
+
</function>
|
1704
|
+
|
1705
|
+
<function name="attachFile">
|
1706
|
+
|
1707
|
+
<param name="fieldLocator">an <a href="#locators">element locator</a></param>
|
1708
|
+
|
1709
|
+
<param name="fileLocator">a URL pointing to the specified file. Before the file can be set in the input field (fieldLocator), Selenium RC may need to transfer the file to the local machine before attaching the file in a web page form. This is common in selenium grid configurations where the RC server driving the browser is not the same machine that started the test. Supported Browsers: Firefox ("*chrome") only.</param>
|
1710
|
+
|
1711
|
+
<comment>Sets a file input (upload) field to the file listed in fileLocator</comment>
|
1712
|
+
|
1713
|
+
</function>
|
1714
|
+
|
1715
|
+
<function name="captureScreenshot">
|
1716
|
+
|
1717
|
+
<param name="filename">the absolute path to the file to be written, e.g. "c:\blah\screenshot.png"</param>
|
1718
|
+
|
1719
|
+
<comment>Captures a PNG screenshot to the specified file.</comment>
|
1720
|
+
|
1721
|
+
</function>
|
1722
|
+
|
1723
|
+
<function name="captureScreenshotToString">
|
1724
|
+
|
1725
|
+
<return type="string">The base 64 encoded string of the screen shot (PNG file)</return>
|
1726
|
+
|
1727
|
+
<comment>Capture a PNG screenshot. It then returns the file as a base 64 encoded string.</comment>
|
1728
|
+
|
1729
|
+
</function>
|
1730
|
+
|
1731
|
+
<function name="captureEntirePageScreenshotToString">
|
1732
|
+
|
1733
|
+
<return type="string">The base 64 encoded string of the page screenshot (PNG file)</return>
|
1734
|
+
|
1735
|
+
<param name="kwargs">A kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD". This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text).</param>
|
1736
|
+
|
1737
|
+
<comment>Downloads a screenshot of the browser current window canvas to a
|
1738
|
+
based 64 encoded PNG file. The <em>entire</em> windows canvas is captured,
|
1739
|
+
including parts rendered outside of the current view port.
|
1740
|
+
|
1741
|
+
Currently this only works in Mozilla and when running in chrome mode.</comment>
|
1742
|
+
|
1743
|
+
</function>
|
1744
|
+
|
1745
|
+
<function name="shutDownSeleniumServer">
|
1746
|
+
|
1747
|
+
<comment>Kills the running Selenium Server and all browser sessions. After you run this command, you will no longer be able to send
|
1748
|
+
commands to the server; you can't remotely start the server once it has been stopped. Normally
|
1749
|
+
you should prefer to run the "stop" command, which terminates the current browser session, rather than
|
1750
|
+
shutting down the entire server.</comment>
|
1751
|
+
|
1752
|
+
</function>
|
1753
|
+
|
1754
|
+
<function name="retrieveLastRemoteControlLogs">
|
1755
|
+
|
1756
|
+
<return type="string">The last N log messages as a multi-line string.</return>
|
1757
|
+
|
1758
|
+
<comment>Retrieve the last messages logged on a specific remote control. Useful for error reports, especially
|
1759
|
+
when running multiple remote controls in a distributed environment. The maximum number of log messages
|
1760
|
+
that can be retrieve is configured on remote control startup.</comment>
|
1761
|
+
|
1762
|
+
</function>
|
1763
|
+
|
1764
|
+
<function name="keyDownNative">
|
1765
|
+
|
1766
|
+
<param name="keycode">an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!</param>
|
1767
|
+
|
1768
|
+
<comment>Simulates a user pressing a key (without releasing it yet) by sending a native operating system keystroke.
|
1769
|
+
This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing
|
1770
|
+
a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and
|
1771
|
+
metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular
|
1772
|
+
element, focus on the element first before running this command.</comment>
|
1773
|
+
|
1774
|
+
</function>
|
1775
|
+
|
1776
|
+
<function name="keyUpNative">
|
1777
|
+
|
1778
|
+
<param name="keycode">an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!</param>
|
1779
|
+
|
1780
|
+
<comment>Simulates a user releasing a key by sending a native operating system keystroke.
|
1781
|
+
This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing
|
1782
|
+
a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and
|
1783
|
+
metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular
|
1784
|
+
element, focus on the element first before running this command.</comment>
|
1785
|
+
|
1786
|
+
</function>
|
1787
|
+
|
1788
|
+
<function name="keyPressNative">
|
1789
|
+
|
1790
|
+
<param name="keycode">an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!</param>
|
1791
|
+
|
1792
|
+
<comment>Simulates a user pressing and releasing a key by sending a native operating system keystroke.
|
1793
|
+
This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing
|
1794
|
+
a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and
|
1795
|
+
metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular
|
1796
|
+
element, focus on the element first before running this command.</comment>
|
1797
|
+
|
1798
|
+
</function>
|
1799
|
+
|
1800
|
+
</apidoc>
|