selenium-2.25.0/000755 000765 000120 00000000000 12001624431 014700 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/.git-fixfiles000644 000765 000120 00000000215 11754421257 017310 0ustar00davidburnsadmin000000 000000 #!/bin/sh git update-index --assume-unchanged cpp/prebuilt/**/*.so git update-index --assume-unchanged cpp/IEDriver/Generated/atoms.h exit 0 selenium-2.25.0/.gitignore000644 000765 000120 00000002536 11754421257 016715 0ustar00davidburnsadmin000000 000000 projectFilesBackup/ *.iws .DS_Store .svn mockpiframe.log mockpiframe.log.lck junitvmwatcher*.properties test-output/ .*.swp common/build firefox/build htmlunit/build jobbie/build selenium/build support/build iphone/lib/buildtime-src/cocoahttpserver/build/CocoaHTTPServerLibrary.build/Release-iphonesimulator/CocoaHTTPServer.build iphone/lib/buildtime-src/build/ iphone/build/ /build/ android/client/bin/ android/server/bin/ cpp/IEDriver/IEReturnTypes.h java/org/openqa/selenium/ie/IeReturnTypes.java java/client/src/org/openqa/selenium/ie/IeReturnTypes.java .idea/vcs.xml .idea/misc.xml .idea/workspace.xml .idea/projectCodeStyle.xml .idea/* out cpp/IEDriver/sizzle.h third_party/gecko-2/linux third_party/gecko-2/linux64 third_party/gecko-2/win32 third_party/gecko-1.9.2/linux third_party/gecko-1.9.2/win32 third_party/gecko-5/linux third_party/gecko-5/linux64 third_party/gecko-5/win32 third_party/gecko-6 third_party/gecko-7 third_party/gecko-8 third_party/gecko-* cpp/IEDriver/Generated/atoms.h chromedriver.log android/libs android/bin android/local.properties android/proguard.cfg junit*.properties WebDriver.suo WebDriver.sln.cache *.rbc .rbx .yardoc rb/.yardoc .tm_properties maven/*/src maven/*/target java/client/build/ java/server/build/ *.user *.cache obj/ *.opensdf *.suo *.sdf Generated/ selenium-2.25.0/.svn-authors000644 000765 000120 00000013316 11754421257 017215 0ustar00davidburnsadmin000000 000000 adam_goucher@hotmail.com = Adam Goucher aduncan = Andy Duncan ahelleso = Aslak Hellesoy ajaykemparaj@gmail.com = Ajay Kemparaj alexber = alexber alexis.j.vuillemin = Alexis Vuillemin amorujao = amorujao andras.hatvani = Andras Hatvani andreastt@opera.com = Andreas Tolf Tolfsen ato@sny.no = Andreas Tolf Tolfsen andre.nogueira = Andre Nogueira barancev = Alexei Barantsev baran.ozgul = Baran Ozgul berrada@google.com = Dounia Berrada bhkwan = bhkwan bob = bob bret = Bret Pettichord dave.hunt = Dave Hunt dave.hunt@gmail.com = Dave Hunt david.burns@theautomatedtester.co.uk = David Burns dawagner = Daniel Wagner-Hall dawagner@gmail.com = Daniel Wagner-Hall daz = Darrell DeBoer dcotterill = Darren Cotterill ddeboer = Darrell DeBoer dfabulich = Dan Fabulich dkemp = David Kemp ebeans = Erik Beans eran.mes = Eran Mes eran.mes@gmail.com = Eran Mes ericpallen@gmail.com = Eric Allen erikbeans = Erik Beans francois.reynaud = Francois Reynaud francois.reynaud@gmail.com = Francois Reynaud gigix = Jeff Xiong gregory.block = Gregory Block gyrm = Haw-bin Chai hbchai@gmail.com = Haw-bin Chai hbchai = Haw-bin Chai ifland = ifland james.h.evans.jr@gmail.com = Jim Evans james.h.evans.jr = Jim Evans jari.bakken = Jari Bakken jari.bakken@gmail.com = Jari Bakken jbevan = Jennifer Bevan jennifer.bevan = Jennifer Bevan < jennifer.bevan@gmail.com> jeremy.herault = Jeremy Herault Jiayao.Yu = Jiayao Yu jiayao.yu = Jiayao Yu jmleyba@gmail.com = Jason Lebya jmleyba = Jason Lebya josephg = josephg jrhuggin = Jason Huggins jrhuggins@gmail.com = Jason Huggins jrhuggins = Jason Huggins julianharty = Julian Harty julianharty@gmail.com = Julian Harty jwang = Jie Tina Wang kristian.rosenvold@gmail.com = Kristian Rosenvold kristian.rosenvold = Kristian Rosenvold kurniady@gmail.com = Andrian Kurniady kurniady = Andrian Kurniady lhuang = lhuang lukec = lukec luke.semerau@gmail.com = Luke Semerau llaskin@gmail.com = Leo Laskin mdub = Mike Williams michael.tamm2 = Michael Tamm mikemelia = Mike Melia mikeroberts = Mike Roberts miki.tebeka = Miki Tebeka mmelia = Mike Melia mpurland = mpurland nirvdrum = Kevin Menard nirvdrum@gmail.com = Kevin Menard noel.gordon = Noel Gordon PaulHammant = Paul Hammant paul = Paul Hammant perryn = Perryn Fowler ph7 = Philippe Hanrigou phammant = Paul Hammant philippe.hanrigou = Philippe Hanrigou plightbo = Patrick Lightbody pollet.kevin = Kevin Pollet pydi.chandra = Chandra Sekhar Pydi rchatley@gmail.com = Robert Chatley rchatley = Robert Chatley redsquirrel = Dave Hoover rinkrank = Aslak Hellesoy rwilcox = Ryan Wilcox saikia = saikia Samit.Badle@gmail.com = Samit Badle Samit.Badle@googlemail.com = Samit.Badle@googlemail.com santiycr = Santiago Suarez Ordoñez shin = shin shinya = Shinya Kasatani simon.m.stewart = Simon M Stewart simonstewart = Simon M Stewart sproul = Nelson Sproul stuidge@gmail.com = Stuart Knightley theautomatedtester = Davis Burns wpc = wpc zsong = zsong (no author) = Anonymous Coward kjleftin = kjleftin reachjim = reachjim blinkdog = blinkdog antlong = antlong antlong@gmail.com = antlong peter.newhook@gmail.com = Peter Newhook ross.patterson = Ross Patterson ross.patterson@gmail.com = Ross Patterson ahaas@google.com = Andreas Haas selenium-2.25.0/COPYING000644 000765 000120 00000026200 11754421257 015752 0ustar00davidburnsadmin000000 000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2007-2009 Google Inc. Copyright 2007-2009 WebDriver committers Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. selenium-2.25.0/CREDITS.txt000644 000765 000120 00000001401 11754421257 016551 0ustar00davidburnsadmin000000 000000 Credits ======= The following people have offered help, support and/or code to WebDriver. If you feel that you should be on this list but aren't, then please feel free to raise a ticket on the project site (https://selenium.googlecode.com) or send an email directly to one of the project's maintainers. Cast ==== Joe Walnes Vyvyan Codd Zoltar - Knower of All Carlos Villela Michael Tamm James Cooper Malcolm Rowe Mirko Nasato Marc Guillemot Alexis Vuillemin Noel Gordon David Wang Amitabh Saikia Julian Harty Philippe Hanrigou Jon Spalding James Strachen Aslak Hellesoy Rune Flobakk Dan Fabulich Michele Sama Kenneth Leftin Darrell Deboer Muthu Kannan Terence Haddock Jean-Francois Roche Godefroid Chapelle Kristian Rosenvold selenium-2.25.0/go000755 000765 000120 00000000575 11754421257 015261 0ustar00davidburnsadmin000000 000000 #!/bin/bash case `uname` in Darwin) JAVA_OPTS="-d32" ;; *) JAVA_OPTS="-client" ;; esac # we want jruby-complete to take care of all things ruby unset GEM_HOME unset GEM_PATH java $JAVA_OPTS -Xmx900m -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=128m -jar third_party/jruby/jruby-complete.jar -X-C -S rake $* selenium-2.25.0/go.bat000755 000765 000120 00000000222 11754421257 016013 0ustar00davidburnsadmin000000 000000 @echo off java -Xmx900m -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=128m -client -jar third_party\jruby\jruby-complete.jar -X-C -S rake %* selenium-2.25.0/MANIFEST.in000644 000765 000120 00000001355 11770160246 016455 0ustar00davidburnsadmin000000 000000 prune * recursive-include py/selenium/webdriver *.py recursive-include py/selenium/webdriver/common *.py recursive-include py/selenium/common *.py recursive-include py/selenium/webdriver/chrome *.py recursive-include py/selenium/webdriver/opera *.py recursive-include py/selenium/webdriver/firefox *.py *.xpi recursive-include py/selenium/webdriver/firefox/x86 *.so recursive-include py/selenium/webdriver/firefox/amd64 *.so recursive-include py/selenium/webdriver/ie *.py recursive-include py/selenium/webdriver/remote *.py recursive-include py/selenium/webdriver/support *.py include py/selenium/selenium.py include py/selenium/__init__.py include docs/api/py/index.rst include py/CHANGES include py/README recursive-include selenium.egg-info * selenium-2.25.0/PKG-INFO000644 000765 000120 00000005453 12001624431 016004 0ustar00davidburnsadmin000000 000000 Metadata-Version: 1.0 Name: selenium Version: 2.25.0 Summary: Python bindings for Selenium Home-page: http://code.google.com/p/selenium/ Author: UNKNOWN Author-email: UNKNOWN License: UNKNOWN Description: ============ Introduction ============ :Author: David Burns Selenium Python Client Driver is a Python language binding for Selenium Remote Control (version 1.0 and 2.0). Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are supported, as well as the Selenium 1.0 bindings. As work will progresses we'll add more "native" drivers. See here_ for more information. .. _here: http://code.google.com/p/selenium/ Installing ========== Python Client ------------- :: pip install -U selenium Java Server ----------- Download the server from http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar :: java -jar selenium-server-standalone-2.25.0.jar Example ======= :: from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys import time browser = webdriver.Firefox() # Get local session of firefox browser.get("http://www.yahoo.com") # Load page assert "Yahoo!" in browser.title elem = browser.find_element_by_name("p") # Find the query box elem.send_keys("seleniumhq" + Keys.RETURN) time.sleep(0.2) # Let the page load, will be added to the API try: browser.find_element_by_xpath("//a[contains(@href,'http://seleniumhq.org')]") except NoSuchElementException: assert 0, "can't find seleniumhq" browser.close() Documentation ============= `Auto Generated API `_ Use The Source Luke! ==================== http://code.google.com/p/selenium/source/browse/trunk/py/selenium/webdriver/remote/webdriver.py Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: MacOS :: MacOS X Classifier: Topic :: Software Development :: Testing Classifier: Topic :: Software Development :: Libraries Classifier: Programming Language :: Python selenium-2.25.0/properties.yml000644 000765 000120 00000001135 11754421257 017636 0ustar00davidburnsadmin000000 000000 default: android: # Path to the android sdk androidsdkpath : "../android_sdk/" # Target id. To get a list of all targets do "./android list targets". # We want whatever matches the latest android 4.0 (IceCreamSandwich, currently API level 15) # # Note: Android WebDriver will not work on Gingerbread (SDK 2.3) emulator because of # an emulator bug. However it will work with Gingerbread (SDK 2.3) devices. androidtarget : "android-15" # Android platform. You can find supported platforms under androidsdkpath/platforms/ androidplatform : "android-15" selenium-2.25.0/py/000755 000765 000120 00000000000 12001624431 015330 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/Rakefile000644 000765 000120 00000062060 12001574032 016352 0ustar00davidburnsadmin000000 000000 $LOAD_PATH.unshift File.expand_path(".") require 'rake' require 'rake-tasks/files' require 'net/telnet' include Rake::DSL if defined?(Rake::DSL) Rake.application.instance_variable_set "@name", "go" verbose false # The CrazyFun build grammar. There's no magic here, just ruby require 'rake-tasks/crazy_fun' require 'rake-tasks/crazy_fun/mappings/android' require 'rake-tasks/crazy_fun/mappings/export' require 'rake-tasks/crazy_fun/mappings/folder' require 'rake-tasks/crazy_fun/mappings/gcc' require 'rake-tasks/crazy_fun/mappings/java' require 'rake-tasks/crazy_fun/mappings/javascript' require 'rake-tasks/crazy_fun/mappings/mozilla' require 'rake-tasks/crazy_fun/mappings/python' require 'rake-tasks/crazy_fun/mappings/rake' require 'rake-tasks/crazy_fun/mappings/rename' require 'rake-tasks/crazy_fun/mappings/ruby' require 'rake-tasks/crazy_fun/mappings/visualstudio' # The original build rules require 'rake-tasks/task-gen' require 'rake-tasks/checks' require 'rake-tasks/dotnet' require 'rake-tasks/zip' require 'rake-tasks/c' require 'rake-tasks/java' require 'rake-tasks/iphone' require 'rake-tasks/selenium' require 'rake-tasks/se-ide' require 'rake-tasks/ie_code_generator' require 'rake-tasks/gecko_sdks' def version "2.25.0" end ide_version = "1.0.12" # The build system used by webdriver is layered on top of rake, and we call it # "crazy fun" for no readily apparent reason. # First off, create a new CrazyFun object. crazy_fun = CrazyFun.new # Secondly, we add the handlers, which are responsible for turning a build # rule into a (series of) rake tasks. For example if we're looking at a file # in subdirectory "subdir" contains the line: # # java_library(:name => "example", :srcs => ["foo.java"]) # # we would generate a rake target of "//subdir:example" which would generate # a Java JAR at "build/subdir/example.jar". # # If crazy fun doesn't know how to handle a particular output type ("java_library" # in the example above) then it will throw an exception, stopping the build AndroidMappings.new.add_all(crazy_fun) ExportMappings.new.add_all(crazy_fun) FolderMappings.new.add_all(crazy_fun) GccMappings.new.add_all(crazy_fun) JavaMappings.new.add_all(crazy_fun) JavascriptMappings.new.add_all(crazy_fun) MozillaMappings.new.add_all(crazy_fun) PythonMappings.new.add_all(crazy_fun) RakeMappings.new.add_all(crazy_fun) RenameMappings.new.add_all(crazy_fun) RubyMappings.new.add_all(crazy_fun) VisualStudioMappings.new.add_all(crazy_fun) # Not every platform supports building every binary needed, so we sometimes # need to fall back to prebuilt binaries. The prebuilt binaries are stored in # a directory structure identical to that used in the "build" folder, but # rooted at one of the following locations: ["android/prebuilt", "cpp/prebuilt", "ide/main/prebuilt", "javascript/firefox-driver/prebuilt"].each do |pre| crazy_fun.prebuilt_roots << pre end # Finally, find every file named "build.desc" in the project, and generate # rake tasks from them. These tasks are normal rake tasks, and can be invoked # from rake. crazy_fun.create_tasks(Dir["**/build.desc"]) # Notice that because we're using rake, anything you can do in a normal rake # build can also be done here. For example, here we set the default task task :default => [:test] task :all => [:'selenium-java', :'android'] task :all_zip => [:'selenium-java_zip'] task :chrome => [ "//java/client/src/org/openqa/selenium/chrome" ] task :common_core => [ "//common:core" ] task :grid => [ "//java/server/src/org/openqa/grid/selenium" ] task :htmlunit => [ "//java/client/src/org/openqa/selenium/htmlunit" ] task :ie => [ "//java/client/src/org/openqa/selenium/ie" ] task :firefox => [ "//java/client/src/org/openqa/selenium/firefox" ] task :'debug-server' => "//java/client/test/org/openqa/selenium/environment/webserver:webserver:run" task :remote => [:remote_common, :remote_server, :remote_client] task :remote_common => ["//java/client/src/org/openqa/selenium/remote:common"] task :remote_client => ["//java/client/src/org/openqa/selenium/remote"] task :remote_server => ["//java/server/src/org/openqa/selenium/remote/server"] task :safari => [ "//javascript/safari-driver:SafariDriver", "//java/client/src/org/openqa/selenium/safari", ] task :server_lite => ["//java/server/src/org/openqa/selenium/server:server_lite"] task :selenium => [ "//java/client/src/org/openqa/selenium" ] task :support => [ "//java/client/src/org/openqa/selenium/lift", "//java/client/src/org/openqa/selenium/support", ] task :iphone_client => ['//java/client/src/org/openqa/selenium/iphone'] task :iphone => [:iphone_server, :iphone_client] desc 'Build the standalone server' task 'selenium-server-standalone' => '//java/server/src/org/openqa/grid/selenium:selenium:uber' task :ide => [ "//ide:selenium-ide-multi" ] task :ide_proxy_setup => [ "//javascript/selenium-atoms", "se_ide:setup_proxy" ] task :ide_proxy_remove => [ "se_ide:remove_proxy" ] task :ide_bamboo => ["se_ide:assemble_ide_in_bamboo"] task :test_javascript => [ '//javascript/atoms:test:run', '//javascript/webdriver:test:run', '//javascript/selenium-atoms:test:run', '//javascript/selenium-core:test:run'] task :test_android => ["//java/client/test/org/openqa/selenium/android:android-test:run"] task :test_chrome => [ "//java/client/test/org/openqa/selenium/chrome:test:run" ] task :test_chrome_atoms => [ '//javascript/atoms:test_chrome:run', '//javascript/chrome-driver:test:run', '//javascript/webdriver:test_chrome:run'] task :test_htmlunit => [ "//java/client/test/org/openqa/selenium/htmlunit:test_basic:run", "//java/client/test/org/openqa/selenium/htmlunit:test_js:run" ] task :test_grid => [ "//java/server/test/org/openqa/grid/common:test:run", "//java/server/test/org/openqa/grid:test:run", "//java/server/test/org/openqa/grid/e2e:test:run" ] task :test_ie => [ "//java/client/test/org/openqa/selenium/ie:test:run" ] task :test_jobbie => [ :test_ie ] task :test_firefox => [ "//java/client/test/org/openqa/selenium/firefox:test_synthesized:run" ] if (!mac?) task :test_firefox => [ "//java/client/test/org/openqa/selenium/firefox:test_native:run" ] end task :test_opera => [ "//java/client/test/org/openqa/selenium/opera:test:run" ] task :test_remote_server => [ '//java/server/test/org/openqa/selenium/remote/server:test:run' ] task :test_remote => [ '//java/client/test/org/openqa/selenium/remote:common-tests:run', '//java/client/test/org/openqa/selenium/remote:client-tests:run', :test_remote_server ] task :test_safari => [ "//java/client/test/org/openqa/selenium/safari:test:run" ] task :test_support => [ "//java/client/test/org/openqa/selenium/lift:test:run", "//java/client/test/org/openqa/selenium/support:SmallTests:run", "//java/client/test/org/openqa/selenium/support:LargeTests:run" ] task :test_iphone => [:test_iphone_server, '//java/client/test/org/openqa/selenium/iphone:test:run'] task :android => [:android_client, :android_server] task :android_client => ['//java/client/src/org/openqa/selenium/android'] task :android_server => ['//android:android-server'] # TODO(simon): test-core should go first, but it's changing the least for now. task :test_selenium => [ :'test-rc', :'test-v1-emulation', :'test-selenium-backed-webdriver', :'test-core'] task :'test-selenium-backed-webdriver' => [ '//javascript/selenium-atoms:test:run', '//java/client/test/org/openqa/selenium/v1:selenium-backed-webdriver-test:run' ] task :'test-v1-emulation' => [ '//java/client/test/com/thoughtworks/selenium:firefox-emulation-test:run' ] task :'test-rc' => ['//java/client/test/org/openqa/selenium:RcBrowserLauncherTests:run', '//java/server/test/org/openqa/selenium/server:RcServerUnitTests:run', '//java/server/test/org/openqa/selenium/server:RcServerLargeTests:run', '//java/client/test/com/thoughtworks/selenium:firefox-rc-test:run', '//java/client/test/com/thoughtworks/selenium:firefox-proxy-rc-test:run', '//java/client/test/com/thoughtworks/selenium:firefox-singlewindow-rc-test:run'] task :'test-core' => [:'test-core-firefox'] if (windows?) task :'test-v1-emulation' => ['//java/client/test/com/thoughtworks/selenium:ie-emulation-test:run'] task :'test-rc' => ['//java/client/test/com/thoughtworks/selenium:ie-rc-test:run', '//java/client/test/com/thoughtworks/selenium:ie-proxy-rc-test:run', '//java/client/test/com/thoughtworks/selenium:ie-singlewindow-rc-test:run'] task :'test-core' => [:'test-core-ie'] # TODO(santi): why are these disabled? #elsif (mac?) # task :'test-rc' => ['//java/client/test/com/thoughtworks/selenium:safari-rc-test:run', # '//java/client/test/com/thoughtworks/selenium:safari-proxy-rc-test:run'] # task :'test-core' => [:'test-core-safari'] end task :test_java_webdriver => [ :test_htmlunit, :test_firefox, :test_remote_server, ] if (windows?) task :test_java_webdriver => [:test_ie] end if (present?("chromedriver")) task :test_java_webdriver => [:test_chrome] end if (opera?) task :test_java_webdriver => [:test_opera] end task :test_java => [ "//java/client/test/org/openqa/selenium/atoms:test:run", "//java/client/test/org/openqa/selenium:SmallTests:run", :test_support, :test_java_webdriver, :test_selenium, "test_grid", # Android should be installed and the tests should be ran # before commits. :test_android ] task :test_rb => [ "//rb:unit-test", "//rb:rc-client-unit-test", "//rb:firefox-test", "//rb:remote-test", "//rb:rc-client-integration-test", ("//rb:ie-test" if windows?), "//rb:chrome-test", "//rb:safari-test" ].compact task :test_py => [ :py_prep_for_install_release, "//py:firefox_test:run" ] task :test_dotnet => [ "//dotnet/test:firefox:run" ] task :test => [ :test_javascript, :test_java, :test_rb ] if (msbuild_installed?) task :test => [ :test_dotnet ] end if (python?) task :test => [ :test_py ] end task :build => [:all, :iphone, :remote, :selenium] desc 'Clean build artifacts.' task :clean do rm_rf 'build/' rm_rf 'iphone/build/' rm_rf 'iphone/src/objc/atoms.h' rm_rf 'android/bin/' rm_rf 'android/build/' rm_rf 'android/libs/' rm_rf 'android/client/bin/' rm_rf 'java/client/build/' Android::Clean.new() end task :dotnet => [ "//dotnet", "//dotnet:support", "//dotnet:core", "//dotnet:webdriverbackedselenium" ] # Generate a C++ Header file for mapping between magic numbers and #defines # in the C++ code. ie_generate_type_mapping(:name => "ie_result_type_cpp", :src => "cpp/IEDriver/result_types.txt", :type => "cpp", :out => "cpp/IEDriver/IEReturnTypes.h") # Generate a Java class for mapping between magic numbers and Java static # class members describing them. ie_generate_type_mapping(:name => "ie_result_type_java", :src => "cpp/IEDriver/result_types.txt", :type => "java", :out => "java/client/src/org/openqa/selenium/ie/IeReturnTypes.java") GeckoSDKs.new do |sdks| sdks.add 'third_party/gecko-1.9.2/linux', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/3.6.23/sdk/xulrunner-3.6.23.en-US.linux-i686.sdk.tar.bz2', 'f13055d2b793b6ab32797cc292f18de4' sdks.add 'third_party/gecko-2/linux', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/2.0/sdk/xulrunner-2.0.en-US.linux-i686.sdk.tar.bz2', '1ec6039ee99596551845f27d4bc83436' sdks.add 'third_party/gecko-2/linux64', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/2.0/sdk/xulrunner-2.0.en-US.linux-x86_64.sdk.tar.bz2', '101eb57d3f76f77e9c94d3cb25a8d56c' sdks.add 'third_party/gecko-2/mac', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/2.0/sdk/xulrunner-2.0.en-US.mac-x86_64.sdk.tar.bz2', 'ac2ddb114107680fe75ee712cddf1ab4' sdks.add 'third_party/gecko-2/win32', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/2.0/sdk/xulrunner-2.0.en-US.win32.sdk.zip', '5cfa95a2d46334ce6283a772eff19382' sdks.add 'third_party/gecko-10/linux', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/10.0/sdk/xulrunner-10.0.en-US.linux-i686.sdk.tar.bz2', '9ce89327cab356bc133675e5307cbdd3' sdks.add 'third_party/gecko-10/linux64', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/10.0/sdk/xulrunner-10.0.en-US.linux-x86_64.sdk.tar.bz2', '251cd1529050aa656a633a26883f12ac' sdks.add 'third_party/gecko-10/win32', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/10.0/sdk/xulrunner-10.0.en-US.win32.sdk.zip', 'c160fb382345282603ded4bf87abff45' sdks.add 'third_party/gecko-11/linux', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/sdk/xulrunner-11.0.en-US.linux-i686.sdk.tar.bz2', '917b8cba75988a3943773519d2b74228' sdks.add 'third_party/gecko-11/linux64', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/sdk/xulrunner-11.0.en-US.linux-x86_64.sdk.tar.bz2', 'f5e84aa2ec8a1ce13ed50ad2c311ae9e' sdks.add 'third_party/gecko-11/win32', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/sdk/xulrunner-11.0.en-US.win32.sdk.zip', '783dcb0b01a849836c9e3627a87d2dc4' sdks.add 'third_party/gecko-12/linux', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/12.0/sdk/xulrunner-12.0.en-US.linux-i686.sdk.tar.bz2', '7a355c79aeffd975e9c4a4da407e0b78' sdks.add 'third_party/gecko-12/linux64', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/12.0/sdk/xulrunner-12.0.en-US.linux-x86_64.sdk.tar.bz2', 'e9cfc4708a551235e3223cf5b3cc771e' sdks.add 'third_party/gecko-12/win32', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/12.0/sdk/xulrunner-12.0.en-US.win32.sdk.zip', '18daaa5a06bea14f811351bbb0723092' sdks.add 'third_party/gecko-13/linux', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/13.0/sdk/xulrunner-13.0.en-US.linux-i686.sdk.tar.bz2', 'da05198bf5d7452f7ac3c43d894a1779' sdks.add 'third_party/gecko-13/linux64', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/13.0/sdk/xulrunner-13.0.en-US.linux-x86_64.sdk.tar.bz2', '68886fdc8ea8361e6243d8318d7210b8' sdks.add 'third_party/gecko-13/win32', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/13.0/sdk/xulrunner-13.0.en-US.win32.sdk.zip', '8d613999d51be945c7498c9d63946dcc' sdks.add 'third_party/gecko-14/linux', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/14.0.1/sdk/xulrunner-14.0.1.en-US.linux-i686.sdk.tar.bz2', '8af526ccdd0cf1c41fc825d19218fac8' sdks.add 'third_party/gecko-14/linux64', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/14.0.1/sdk/xulrunner-14.0.1.en-US.linux-x86_64.sdk.tar.bz2', '246ec6eff6b2ce90a14bf29f3a2f529d' sdks.add 'third_party/gecko-14/win32', 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/14.0.1/sdk/xulrunner-14.0.1.en-US.win32.sdk.zip', 'ace1b22a31a3566f92755c5464868cb3' end task :'selenium-server_zip' do temp = "build/selenium-server_zip" mkdir_p temp sh "cd #{temp} && jar xf ../selenium-server.zip" rm_f "build/selenium-server.zip" Dir["#{temp}/webdriver-*.jar"].each { |file| rm_rf file } mv "#{temp}/selenium-server.jar", "#{temp}/selenium-server-#{version}.jar" sh "cd #{temp} && jar cMf ../selenium-server.zip *" end {"firefox" => "*chrome", "ie" => "*iexploreproxy", "opera" => "*opera", "safari" => "*safari"}.each_pair do |k,v| selenium_test(:name => "test-core-#{k}", :srcs => [ "common/test/js/core/*.js" ], :deps => [ "//java/server/test/org/openqa/selenium:server-with-tests:uber", ], :browser => v ) end task :javadocs => [:common, :firefox, :htmlunit, :ie, :remote, :support, :chrome, :selenium] do mkdir_p "build/javadoc" sourcepath = "" classpath = '.' Dir["third_party/java/*/*.jar"].each do |jar| classpath << ":" + jar end [File.join(%w(java client src))].each do |m| sourcepath += File::PATH_SEPARATOR + m end p sourcepath cmd = "javadoc -notimestamp -d build/javadoc -sourcepath #{sourcepath} -classpath #{classpath} -subpackages org.openqa.selenium -subpackages com.thoughtworks " cmd << " -exclude org.openqa.selenium.internal.selenesedriver:org.openqa.selenium.internal.seleniumemulation:org.openqa.selenium.remote.internal" if (windows?) cmd = cmd.gsub(/\//, "\\").gsub(/:/, ";") end sh cmd end task :py_prep_for_install_release => ["//javascript/firefox-driver:webdriver", :chrome] do if python? then firefox_py_home = "py/selenium/webdriver/firefox/" xpi_zip_build = 'build/javascript/firefox-driver/webdriver.xpi' x86 = firefox_py_home + "x86/" amd64 = firefox_py_home + "amd64/" if (windows?) then xpi_zip_build = xpi_zip_build.gsub(/\//, "\\") firefox_py_home = firefox_py_home .gsub(/\//, "\\") x86 = x86.gsub(/\//,"\\") amd64 = amd64.gsub(/\//,"\\") end mkdir_p x86 unless File.exists?(x86) mkdir_p amd64 unless File.exists?(amd64) cp "cpp/prebuilt/i386/libnoblur.so", x86+"x_ignore_nofocus.so", :verbose => true cp "cpp/prebuilt/amd64/libnoblur64.so", amd64+"x_ignore_nofocus.so", :verbose => true cp xpi_zip_build , firefox_py_home, :verbose => true end end task :py_install => :py_prep_for_install_release do sh "python setup.py install" end task :py_release => :py_prep_for_install_release do sh "grep -v test setup.py > setup_release.py; mv setup_release.py setup.py" sh "python setup.py sdist upload" sh "svn revert setup.py" end task :test_selenium_py => [:'selenium-core', :'selenium-server-standalone'] do if python? then sh "python2.6 selenium/test/py/runtests.py", :verbose => true end end #### iPhone #### task :iphone_server do sdk = iPhoneSDK? if sdk != nil then puts "Building iWebDriver iphone app." sh "cd iphone && xcodebuild -sdk #{sdk} ARCHS=i386 -target iWebDriver", :verbose => false else puts "XCode not found. Not building the iphone driver." end end # This does not depend on :iphone_server because the dependancy is specified in xcode task :test_iphone_server do sdk = iPhoneSDK? if sdk != nil then sh "cd iphone && xcodebuild -sdk #{sdk} ARCHS=i386 -target Tests" else puts "XCode and/or iPhoneSDK not found. Not testing iphone_server." end end file "iphone/src/objc/atoms.h" => ["//iphone:atoms"] do |task| puts "Writing: #{task}" cp "build/iphone/atoms.h", "iphone/src/objc/atoms.h" end task :iphone_atoms => ["iphone/src/objc/atoms.h"] file "cpp/IEDriver/sizzle.h" => [ "//third_party/js/sizzle:sizzle:header" ] do cp "build/third_party/js/sizzle/sizzle.h", "cpp/IEDriver/sizzle.h" end task :sizzle_header => [ "cpp/IEDriver/sizzle.h" ] file "build/javascript/deps.js" => FileList[ "third_party/closure/goog/**/*.js", "javascript/*/**/*.js", # Don't depend on js files directly in javascript/ ] do our_cmd = "java -jar third_party/py/jython.jar third_party/closure/bin/calcdeps.py " our_cmd << "--output_mode=deps --path=javascript " our_cmd << "--dep=third_party/closure/goog" # Generate the deps. The file paths will be as they appear on the filesystem, # but for our tests, the WebDriverJS source files are served from /js/src and # the Closure Library source is under /third_party/closure/goog, so we need # to modify the generated paths to match that scheme. output = "" io = IO.popen(our_cmd) io.each do |line| line = line.gsub("\\\\", "/") output << line.gsub(/common\/(.*)\/js/, 'js/\1') end built_deps = "build/javascript/deps.js" puts "Writing #{built_deps}" mkdir_p File.dirname(built_deps) File.open(built_deps, "w") do |f| f.write(output); end cp built_deps, "javascript/deps.js" end desc "Calculate dependencies required for testing the automation atoms" task :calcdeps => "build/javascript/deps.js" task :test_webdriverjs => [ "//javascript/webdriver:test:run", "//javascript/webdriver:test_e2e:run" ] desc "Generate a single file with WebDriverJS' public API" task :webdriverjs => [ "//javascript/webdriver:webdriver" ] task :release => [ '//java/server/src/org/openqa/selenium/server:server:zip', '//java/server/src/org/openqa/grid/selenium:selenium:zip', '//java/client/src/org/openqa/selenium:client-combined:zip', '//android:android-server' ] do |t| # Unzip each of the deps and rename the pieces that need renaming renames = { "client-combined-nodeps-srcs.jar" => "selenium-java-#{version}-srcs.jar", "client-combined-nodeps.jar" => "selenium-java-#{version}.jar", "selenium-nodeps-srcs.jar" => "selenium-server-#{version}-srcs.jar", "selenium-nodeps.jar" => "selenium-server-#{version}.jar", "selenium-standalone.jar" => "selenium-server-standalone-#{version}.jar", } t.prerequisites.each do |pre| zip = Rake::Task[pre].out next unless zip =~ /\.zip$/ temp = zip + "rename" rm_rf temp deep = File.join(temp, "/selenium-#{version}") mkdir_p deep cp 'java/CHANGELOG', deep sh "cd #{deep} && jar xf ../../#{File.basename(zip)}" renames.each do |from, to| src = File.join(deep, from) next unless File.exists?(src) mv src, File.join(deep, to) end rm_f File.join(deep, "client-combined-standalone.jar") rm zip sh "cd #{temp} && jar cMf ../#{File.basename(zip)} *" rm_rf temp end mkdir_p "build/dist" cp "build/java/server/src/org/openqa/grid/selenium/selenium-standalone.jar", "build/dist/selenium-server-standalone-#{version}.jar" cp "build/java/server/src/org/openqa/grid/selenium/selenium.zip", "build/dist/selenium-server-#{version}.zip" cp "build/java/client/src/org/openqa/selenium/client-combined.zip", "build/dist/selenium-java-#{version}.zip" end task :push_release => [:release] do py = "java -jar third_party/py/jython.jar" if (python?) py = "python" end print "Enter your googlecode username:" googlecode_username = STDIN.gets.chomp print "Enter your googlecode password (NOT your gmail password, the one you use for svn, available at https://code.google.com/hosting/settings):" googlecode_password = STDIN.gets.chomp [ {:file => "build/dist/selenium-server-standalone-#{version}.jar", :description => "Use this if you want to use the Selenium RC or Remote WebDriver or use Grid 2 without needing any additional dependencies"}, {:file => "build/dist/selenium-server-#{version}.zip", :description => "All variants of the Selenium Server: stand-alone, jar with dependencies and sources."}, {:file => "build/dist/selenium-java-#{version}.zip", :description => "The Java bindings for Selenium 2, including the WebDriver API and the Selenium RC clients. Download this if you plan on just using the client-side pieces of Selenium"} ].each do |file| puts "Uploading file #{file[:file]}..." sh "#{py} third_party/py/googlecode/googlecode_upload.py -s '#{file[:description]}' -p selenium #{file[:file]} -l Featured -u #{googlecode_username} -w #{googlecode_password}" end end desc 'Build the selenium client jars' task 'selenium-java' => '//java/client/src/org/openqa/selenium:client-combined:project' desc 'Build and package Selenium IDE' task :release_ide => [:ide] do cp 'build/ide/selenium-ide.xpi', "build/ide/selenium-ide-#{ide_version}.xpi" end # TODO: do this properly namespace :docs do task :mime_types do sh "svn propset svn:mime-type text/html #{Dir['docs/api/**/*.html'].join ' '}" sh "svn propset svn:mime-type application/javascript #{Dir['docs/api/**/*.js'].join ' '}" sh "svn propset svn:mime-type text/css #{Dir['docs/api/**/*.css'].join ' '}" end end namespace :safari do desc "Build the SafariDriver extension" task :extension => [ "//javascript/safari-driver:SafariDriver" ] desc "Build the SafariDriver extension and java client" task :build => [ :extension, "//java/client/src/org/openqa/selenium/safari" ] desc "Run the SafariDriver's java test suite" task :test => [ "//java/client/test/org/openqa/selenium/safari:test:run" ] desc "Re-install the SafariDriver extension; OSX only" task :reinstall => [ :extension ] do |t| raise StandardError, "Task #{t.name} is only available on OSX" unless mac? sh "osascript javascript/safari-driver/reinstall.scpt" end end at_exit do if File.exist?(".git") && !Platform.windows? sh "sh .git-fixfiles" end end selenium-2.25.0/README.md000644 000765 000120 00000013311 11754421257 016175 0ustar00davidburnsadmin000000 000000 Selenium 2.0 builds with its own build technology that's good for Windows, Linux and Mac. # Quick intro In the same directory as this file, do ... ./go The order of building modules is determined by the 'go' system itself. If you want to build an individual module (assuming all dependent modules have previously been build) try something like ... ./go //javascript/atoms:test:run In this case, javascript/atoms is the module directory, and "test" is a target in that directory's build.desc file As you see 'build targets' scroll past in the log, you may want to run them individually. 'Go' can run them individually, by target name as long as ":run" is appended (see above). # Requirements * Java 6 JDK * "java" and "jar" on the PATH Although the build system is based on rake it's **strongly advised** to rely on the version of JRuby in third_party/ that is invoked by "go". The only developer type who would want to deviate from this is the "build maintainer" who's experimenting with a JRuby upgrade. ## Optional Requirements * Python 2.6.x to 2.7 (without this, Python tests will be skipped) ## Internet Explorer Driver If you plan to compile the IE driver you also need: * Visual Studio 2008 * 32 and 64 bit cross compilers The build will work on any platform, but the tests for IE will be skipped silently, if you are not building on Windows. # Common Tasks For an express build of the binaries we release run the following from the directory containing the Rakefile: ./go clean release All build output is placed under the "build" directory. The output can be found under "build/dist". If an error occurs while running this task complaining about a missing Albacore gem, the chances are you're using rvm. If this is the case, switch to the system ruby: rvm system Of course, building the entire project can take too long. If you just want to build a single driver, then you can run one of these targets: ./go chrome ./go firefox ./go htmlunit ./go ie As the build progresses, you'll see it report where the build outputs are being placed. Of course, just building isn't enough. We should really be able to run the tests too. Try: ./go test_chrome ./go test_firefox ./go test_htmlunit ./go test_ie Note that the "test_chrome" target requires that you have the separate chrome driver binary available on your PATH. If you are interested in a single language binding, try one of: ./go test_java ./go test_dotnet ./go test_rb ./go test_javascript To run all the tests just run: ./go test This will detect your OS and run all the tests that are known to be stable for every browser that's appropriate to use for all language bindings. This can take a healthy amount of time to run. To run the minimal logical Selenium build: ./go test_javascript test_java To get a list of tasks you could build, do: ./go -T As a side note, none of the developers run tests using cygwin. It is very unlikely that the build will work as expected if you try and use cygwin. # Tour The code base is generally segmented around the languages used to write the component. Selenium makes extensive use of Javascript, so let's start there. Working on the javascript is easy. First of all, start the development server: ./go debug-server Now navigate to [http://localhost:2310/javascript](http://localhost:2310/javascript) You'll find the contents of the javascript directory being shown. We use the Closure Library for developing much of the javascript, so now navigate to [http://localhost:2310/javascript/atoms/test](http://localhost:2310/javascript/atoms/test) The tests in this directory are normal HTML files with names ending with "_test.html". Click on one to load the page and run the test. You can run all the javascript tests using: ./go test_javascript # Maven POM files Ignore the Maven POM file present in the same directory. It is only used for releasing to jars to Maven Repository (public or local), and is not considered the main build mechanism. # Build Output "./go" only makes a top-level "build" directory. Outputs are placed under that relative to the target name. Which is probably best described with an example. For the target: //java/client/src/org/openqa/selenium:selenium-api The output is found under: build/java/client/src/org/openqa/selenium/selenium-api.jar If you watch the build, each step should print where its output is going. Java test outputs appear in one of two places: either under build/test_logs for junit or in build/build_log.xml for TestNG tests. If you'd like the build to be chattier, just append "log=true" to the build command line. # Help with 'Go' More general, but basic, help for 'go' ... ./go --help Remember, "go" is just a wrapper around "rake", so you can use the standard rake commands such as "rake -T" to get more information about available targets. # Maven per se If it is not clear already, Selenium is not built with Maven, it is built with 'Crazy Fun' though that is invoked with 'go' as outlined above so you do not really have to learn too much about that. That said, it is possible to relatively quickly build selenium pieces for Maven to use. You are only really going to want to do this when you are testing the cutting-edge of Selenium development (which we welcome) against your application. Here is the quickest way to build and deploy into you local maven repository, while skipping Selenium's own tests. ./go release cd maven mvn clean install This sequence will push some seven or so jars into you local Maven repository with something like 'selenium-server-2.0-SNAPSHOT.jar' as the name. # Last word on building the bits and pieces of Selenium Refer [Building Web Driver wiki page](http://code.google.com/p/selenium/wiki/BuildingWebDriver) selenium-2.25.0/selenium.egg-info/000755 000765 000120 00000000000 12001624431 020213 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/selenium.eml000644 000765 000120 00000030167 11761154217 017243 0ustar00davidburnsadmin000000 000000 selenium-2.25.0/selenium.iml000644 000765 000120 00000002454 11754421257 017250 0ustar00davidburnsadmin000000 000000 selenium-2.25.0/setup.cfg000644 000765 000120 00000000073 12001624431 016521 0ustar00davidburnsadmin000000 000000 [egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 selenium-2.25.0/setup.py000644 000765 000120 00000007126 12001624400 016414 0ustar00davidburnsadmin000000 000000 #!/usr/bin/env python # Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from setuptools import setup from setuptools.command.install import install from os.path import dirname, join, isfile, abspath from shutil import copy import sys from distutils.command.install import INSTALL_SCHEMES for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] def setup_python3(): # Taken from "distribute" setup.py from distutils.filelist import FileList from distutils import dir_util, file_util, util, log tmp_src = join("build", "src") log.set_verbosity(1) fl = FileList() for line in open("MANIFEST.in"): if not line.strip(): continue fl.process_template_line(line) dir_util.create_tree(tmp_src, fl.files) outfiles_2to3 = [] for f in fl.files: outf, copied = file_util.copy_file(f, join(tmp_src, f), update=1) if copied and outf.endswith(".py"): outfiles_2to3.append(outf) util.run_2to3(outfiles_2to3) # arrange setup to use the copy sys.path.insert(0, tmp_src) return tmp_src if sys.version_info >= (3,): src_root = setup_python3() else: src_root = "." setup( cmdclass={'install': install}, name='selenium', version="2.25.0", description='Python bindings for Selenium', long_description=open(join(abspath(dirname(__file__)), "py", "README")).read(), url='http://code.google.com/p/selenium/', src_root=src_root, classifiers=['Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX', 'Operating System :: Microsoft :: Windows', 'Operating System :: MacOS :: MacOS X', 'Topic :: Software Development :: Testing', 'Topic :: Software Development :: Libraries', 'Programming Language :: Python'], package_dir={ 'selenium': 'py/selenium', 'selenium.common': 'py/selenium/common', 'selenium.webdriver': 'py/selenium/webdriver', }, packages=['selenium', 'selenium.common', 'selenium.webdriver', 'selenium.webdriver.chrome', 'selenium.webdriver.common', 'selenium.webdriver.support', 'selenium.webdriver.firefox', 'selenium.webdriver.ie', 'selenium.webdriver.opera', 'selenium.webdriver.remote', 'selenium.webdriver.support', ], package_data={ 'selenium.webdriver.firefox': ['*.xpi'], }, data_files=[('selenium/webdriver/firefox/x86', ['py/selenium/webdriver/firefox/x86/x_ignore_nofocus.so']), ('selenium/webdriver/firefox/amd64', ['py/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so'])], include_package_data=True, zip_safe=False, ) selenium-2.25.0/WebDriver.sln000644 000765 000120 00000110612 11757146567 017342 0ustar00davidburnsadmin000000 000000 Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "web", "common\src\web\", "{DB560F4B-1F41-4E8E-AC06-640D736E8A72}" ProjectSection(WebsiteProperties) = preProject TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0" Debug.AspNetCompiler.VirtualPath = "/web" Debug.AspNetCompiler.PhysicalPath = "common\src\web\" Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\web\" Debug.AspNetCompiler.Updateable = "true" Debug.AspNetCompiler.ForceOverwrite = "true" Debug.AspNetCompiler.FixedNames = "false" Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.VirtualPath = "/web" Release.AspNetCompiler.PhysicalPath = "common\src\web\" Release.AspNetCompiler.TargetPath = "PrecompiledWeb\web\" Release.AspNetCompiler.Updateable = "true" Release.AspNetCompiler.ForceOverwrite = "true" Release.AspNetCompiler.FixedNames = "false" Release.AspNetCompiler.Debug = "False" VWDPort = "2311" VWDDynamicPort = "false" VWDVirtualPath = "/common" DefaultWebSiteLanguage = "Visual C#" StartServerOnDebug = "false" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webdriver-interactions", "cpp\webdriver-interactions\webdriver-interactions.vcxproj", "{87FA39A1-958E-478A-8AB9-6D5E5AAA3886}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webdriver-firefox", "cpp\webdriver-firefox\webdriver-firefox.vcxproj", "{A9D3BB2D-FD1E-43A2-80F6-F8320682323E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEDriver", "cpp\IEDriver\IEDriver.vcxproj", "{BB72383B-427F-4191-B692-E4345A30E33C}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "json-cpp", "third_party\json-cpp\json-cpp.vcxproj", "{320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mongoose", "third_party\mongoose\mongoose.vcxproj", "{9AEBD612-232D-40CB-BE2C-F2B911FD6228}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Selenium.Core", "dotnet\src\Selenium.Core\Selenium.Core.csproj", "{69F4FF0E-13DE-4AF6-B8AF-572A36239083}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Selenium.WebDriverBackedSelenium", "dotnet\src\Selenium.WebDriverBackedSelenium\Selenium.WebDriverBackedSelenium.csproj", "{0EAF6AA9-B712-464B-A11B-FA3CF7577D80}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver.Support", "dotnet\src\WebDriver.Support\WebDriver.Support.csproj", "{A9779443-E254-47E9-B733-8AC6D3662CA6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver.Common.Tests", "dotnet\test\WebDriver.Common.Tests\WebDriver.Common.Tests.csproj", "{1580564D-B6B8-4BD8-A120-001E3E8E5BE6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver.Remote.Tests", "dotnet\test\WebDriver.Remote.Tests\WebDriver.Remote.Tests.csproj", "{1D3DF4DB-6C11-480D-9774-F489B2EF62D8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver.Chrome.Tests", "dotnet\test\WebDriver.Chrome.Tests\WebDriver.Chrome.Tests.csproj", "{81D664AA-FC03-425E-98A8-B4EAF8236776}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver.Firefox.Tests", "dotnet\test\WebDriver.Firefox.Tests\WebDriver.Firefox.Tests.csproj", "{630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver.IE.Tests", "dotnet\test\WebDriver.IE.Tests\WebDriver.IE.Tests.csproj", "{ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver.Support.Tests", "dotnet\test\WebDriver.Support.Tests\WebDriver.Support.Tests.csproj", "{1B70379B-5325-4243-8629-5C32802E9826}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Selenium.Core.Tests", "dotnet\test\Selenium.Core.Tests\Selenium.Core.Tests.csproj", "{42D1B587-9544-452F-8B76-4F2A65BC9BE5}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Selenium.WebDriverBackedSelenium.Tests", "dotnet\test\Selenium.WebDriverBackedSelenium.Tests\Selenium.WebDriverBackedSelenium.Tests.csproj", "{68CF4628-4148-4627-ACA1-D4C225365D3F}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imehandler", "cpp\imehandler\imehandler.vcxproj", "{37F9EF6B-F69C-4764-9687-C63C608C476B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver.Android.Tests", "dotnet\test\WebDriver.Android.Tests\WebDriver.Android.Tests.csproj", "{3102A61F-3025-482C-9515-9FC239746658}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver", "dotnet\src\WebDriver\WebDriver.csproj", "{83C13931-B27C-425C-AAF0-5F96EEA4F173}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webdriver-server", "cpp\webdriver-server\webdriver-server.vcxproj", "{35A23A16-EF17-4CC3-8854-785025A304F3}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webdriver-firefox-latest", "cpp\webdriver-firefox\webdriver-firefox-latest.vcxproj", "{FE99DB39-DAB7-43BD-BF08-6549FAB88C13}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webdriver-firefox-previous", "cpp\webdriver-firefox\webdriver-firefox-previous.vcxproj", "{322CD167-C8F9-4E13-8F8A-DFAE834255AA}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDriver.Safari.Tests", "dotnet\test\WebDriver.Safari.Tests\WebDriver.Safari.Tests.csproj", "{92551430-7C30-421B-A81E-0B08163AC59C}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEDriverServer", "cpp\IEDriverServer\IEDriverServer.vcxproj", "{08C3286F-F132-44EC-80F0-2DF30D87A5D3}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webdriver-firefox-10", "cpp\webdriver-firefox\webdriver-firefox-10.vcxproj", "{979D51D1-AB6B-482D-AC3F-C5B226CFB904}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|.NET = Release|.NET Release|Any CPU = Release|Any CPU Release|Mixed Platforms = Release|Mixed Platforms Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Debug|.NET.ActiveCfg = Debug|.NET {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Debug|Any CPU.ActiveCfg = Debug|.NET {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Debug|Mixed Platforms.ActiveCfg = Debug|.NET {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Debug|Win32.ActiveCfg = Debug|.NET {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Debug|x64.ActiveCfg = Debug|.NET {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Release|.NET.ActiveCfg = Debug|.NET {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Release|Any CPU.ActiveCfg = Debug|.NET {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Release|Mixed Platforms.ActiveCfg = Debug|.NET {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Release|Win32.ActiveCfg = Debug|.NET {DB560F4B-1F41-4E8E-AC06-640D736E8A72}.Release|x64.ActiveCfg = Debug|.NET {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Debug|.NET.ActiveCfg = Debug|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Debug|Any CPU.ActiveCfg = Debug|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Debug|Win32.ActiveCfg = Debug|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Debug|Win32.Build.0 = Debug|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Debug|x64.ActiveCfg = Debug|x64 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Debug|x64.Build.0 = Debug|x64 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Release|.NET.ActiveCfg = Release|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Release|Any CPU.ActiveCfg = Release|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Release|Mixed Platforms.ActiveCfg = Release|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Release|Mixed Platforms.Build.0 = Release|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Release|Win32.ActiveCfg = Release|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Release|Win32.Build.0 = Release|Win32 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Release|x64.ActiveCfg = Release|x64 {87FA39A1-958E-478A-8AB9-6D5E5AAA3886}.Release|x64.Build.0 = Release|x64 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Debug|.NET.ActiveCfg = Debug|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Debug|Any CPU.ActiveCfg = Debug|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Debug|Win32.ActiveCfg = Debug|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Debug|Win32.Build.0 = Debug|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Debug|x64.ActiveCfg = Debug|x64 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Release|.NET.ActiveCfg = Release|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Release|Any CPU.ActiveCfg = Release|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Release|Mixed Platforms.ActiveCfg = Release|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Release|Mixed Platforms.Build.0 = Release|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Release|Win32.ActiveCfg = Release|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Release|Win32.Build.0 = Release|Win32 {A9D3BB2D-FD1E-43A2-80F6-F8320682323E}.Release|x64.ActiveCfg = Release|x64 {BB72383B-427F-4191-B692-E4345A30E33C}.Debug|.NET.ActiveCfg = Debug|x64 {BB72383B-427F-4191-B692-E4345A30E33C}.Debug|Any CPU.ActiveCfg = Debug|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Debug|Win32.ActiveCfg = Debug|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Debug|Win32.Build.0 = Debug|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Debug|x64.ActiveCfg = Debug|x64 {BB72383B-427F-4191-B692-E4345A30E33C}.Debug|x64.Build.0 = Debug|x64 {BB72383B-427F-4191-B692-E4345A30E33C}.Release|.NET.ActiveCfg = Release|x64 {BB72383B-427F-4191-B692-E4345A30E33C}.Release|Any CPU.ActiveCfg = Release|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Release|Mixed Platforms.ActiveCfg = Release|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Release|Mixed Platforms.Build.0 = Release|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Release|Win32.ActiveCfg = Release|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Release|Win32.Build.0 = Release|Win32 {BB72383B-427F-4191-B692-E4345A30E33C}.Release|x64.ActiveCfg = Release|x64 {BB72383B-427F-4191-B692-E4345A30E33C}.Release|x64.Build.0 = Release|x64 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|.NET.ActiveCfg = Debug|x64 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|Any CPU.ActiveCfg = Debug|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|Win32.ActiveCfg = Debug|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|Win32.Build.0 = Debug|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|x64.ActiveCfg = Debug|x64 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Debug|x64.Build.0 = Debug|x64 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|.NET.ActiveCfg = Release|x64 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|Any CPU.ActiveCfg = Release|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|Mixed Platforms.ActiveCfg = Release|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|Mixed Platforms.Build.0 = Release|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|Win32.ActiveCfg = Release|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|Win32.Build.0 = Release|Win32 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|x64.ActiveCfg = Release|x64 {320F3BBE-8223-4E7F-ABEE-18D3BD57B1FD}.Release|x64.Build.0 = Release|x64 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Debug|.NET.ActiveCfg = Debug|x64 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Debug|Any CPU.ActiveCfg = Debug|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Debug|Win32.ActiveCfg = Debug|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Debug|Win32.Build.0 = Debug|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Debug|x64.ActiveCfg = Debug|x64 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Debug|x64.Build.0 = Debug|x64 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Release|.NET.ActiveCfg = Release|x64 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Release|Any CPU.ActiveCfg = Release|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Release|Mixed Platforms.ActiveCfg = Release|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Release|Mixed Platforms.Build.0 = Release|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Release|Win32.ActiveCfg = Release|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Release|Win32.Build.0 = Release|Win32 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Release|x64.ActiveCfg = Release|x64 {9AEBD612-232D-40CB-BE2C-F2B911FD6228}.Release|x64.Build.0 = Release|x64 {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Debug|.NET.ActiveCfg = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Debug|Any CPU.Build.0 = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Debug|Win32.ActiveCfg = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Debug|x64.ActiveCfg = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Release|.NET.ActiveCfg = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Release|Any CPU.ActiveCfg = Release|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Release|Any CPU.Build.0 = Release|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Release|Mixed Platforms.Build.0 = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Release|Win32.ActiveCfg = Debug|Any CPU {69F4FF0E-13DE-4AF6-B8AF-572A36239083}.Release|x64.ActiveCfg = Debug|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Debug|.NET.ActiveCfg = Debug|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Debug|Any CPU.Build.0 = Debug|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Debug|Win32.ActiveCfg = Debug|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Debug|x64.ActiveCfg = Debug|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Release|.NET.ActiveCfg = Release|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Release|Any CPU.ActiveCfg = Release|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Release|Any CPU.Build.0 = Release|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Release|Mixed Platforms.Build.0 = Release|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Release|Win32.ActiveCfg = Release|Any CPU {0EAF6AA9-B712-464B-A11B-FA3CF7577D80}.Release|x64.ActiveCfg = Release|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Debug|.NET.ActiveCfg = Debug|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Debug|Any CPU.Build.0 = Debug|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Debug|Win32.ActiveCfg = Debug|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Debug|x64.ActiveCfg = Debug|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Release|.NET.ActiveCfg = Release|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Release|Any CPU.ActiveCfg = Release|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Release|Any CPU.Build.0 = Release|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Release|Mixed Platforms.Build.0 = Release|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Release|Win32.ActiveCfg = Release|Any CPU {A9779443-E254-47E9-B733-8AC6D3662CA6}.Release|x64.ActiveCfg = Release|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Debug|.NET.ActiveCfg = Debug|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Debug|Any CPU.Build.0 = Debug|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Debug|Win32.ActiveCfg = Debug|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Debug|x64.ActiveCfg = Debug|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Release|.NET.ActiveCfg = Release|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Release|Any CPU.ActiveCfg = Release|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Release|Any CPU.Build.0 = Release|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Release|Mixed Platforms.Build.0 = Release|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Release|Win32.ActiveCfg = Release|Any CPU {1580564D-B6B8-4BD8-A120-001E3E8E5BE6}.Release|x64.ActiveCfg = Release|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Debug|.NET.ActiveCfg = Debug|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Debug|Win32.ActiveCfg = Debug|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Debug|x64.ActiveCfg = Debug|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Release|.NET.ActiveCfg = Release|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Release|Any CPU.ActiveCfg = Release|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Release|Any CPU.Build.0 = Release|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Release|Mixed Platforms.Build.0 = Release|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Release|Win32.ActiveCfg = Release|Any CPU {1D3DF4DB-6C11-480D-9774-F489B2EF62D8}.Release|x64.ActiveCfg = Release|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Debug|.NET.ActiveCfg = Debug|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Debug|Any CPU.Build.0 = Debug|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Debug|Win32.ActiveCfg = Debug|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Debug|x64.ActiveCfg = Debug|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Release|.NET.ActiveCfg = Release|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Release|Any CPU.ActiveCfg = Release|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Release|Any CPU.Build.0 = Release|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Release|Mixed Platforms.Build.0 = Release|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Release|Win32.ActiveCfg = Release|Any CPU {81D664AA-FC03-425E-98A8-B4EAF8236776}.Release|x64.ActiveCfg = Release|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Debug|.NET.ActiveCfg = Debug|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Debug|Any CPU.Build.0 = Debug|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Debug|Win32.ActiveCfg = Debug|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Debug|x64.ActiveCfg = Debug|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Release|.NET.ActiveCfg = Release|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Release|Any CPU.ActiveCfg = Release|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Release|Any CPU.Build.0 = Release|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Release|Mixed Platforms.Build.0 = Release|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Release|Win32.ActiveCfg = Release|Any CPU {630FC167-169E-4CFD-83ED-9BA4AA8A0FB4}.Release|x64.ActiveCfg = Release|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Debug|.NET.ActiveCfg = Debug|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Debug|Any CPU.Build.0 = Debug|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Debug|Win32.ActiveCfg = Debug|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Debug|x64.ActiveCfg = Debug|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Release|.NET.ActiveCfg = Release|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Release|Any CPU.ActiveCfg = Release|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Release|Any CPU.Build.0 = Release|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Release|Mixed Platforms.Build.0 = Release|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Release|Win32.ActiveCfg = Release|Any CPU {ECF3B49F-68B0-4A2A-8559-6D7FB906AA88}.Release|x64.ActiveCfg = Release|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Debug|.NET.ActiveCfg = Debug|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Debug|Win32.ActiveCfg = Debug|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Debug|x64.ActiveCfg = Debug|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Release|.NET.ActiveCfg = Release|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Release|Any CPU.Build.0 = Release|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Release|Mixed Platforms.Build.0 = Release|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Release|Win32.ActiveCfg = Release|Any CPU {1B70379B-5325-4243-8629-5C32802E9826}.Release|x64.ActiveCfg = Release|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Debug|.NET.ActiveCfg = Debug|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Debug|Any CPU.Build.0 = Debug|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Debug|Win32.ActiveCfg = Debug|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Debug|x64.ActiveCfg = Debug|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Release|.NET.ActiveCfg = Release|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Release|Any CPU.ActiveCfg = Release|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Release|Any CPU.Build.0 = Release|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Release|Mixed Platforms.Build.0 = Release|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Release|Win32.ActiveCfg = Release|Any CPU {42D1B587-9544-452F-8B76-4F2A65BC9BE5}.Release|x64.ActiveCfg = Release|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Debug|.NET.ActiveCfg = Debug|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Debug|Any CPU.Build.0 = Debug|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Debug|Win32.ActiveCfg = Debug|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Debug|x64.ActiveCfg = Debug|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Release|.NET.ActiveCfg = Release|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Release|Any CPU.ActiveCfg = Release|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Release|Any CPU.Build.0 = Release|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Release|Mixed Platforms.Build.0 = Release|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Release|Win32.ActiveCfg = Release|Any CPU {68CF4628-4148-4627-ACA1-D4C225365D3F}.Release|x64.ActiveCfg = Release|Any CPU {37F9EF6B-F69C-4764-9687-C63C608C476B}.Debug|.NET.ActiveCfg = Debug|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Debug|Any CPU.ActiveCfg = Debug|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Debug|Win32.ActiveCfg = Debug|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Debug|Win32.Build.0 = Debug|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Debug|x64.ActiveCfg = Debug|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Release|.NET.ActiveCfg = Release|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Release|Any CPU.ActiveCfg = Release|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Release|Mixed Platforms.ActiveCfg = Release|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Release|Mixed Platforms.Build.0 = Release|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Release|Win32.ActiveCfg = Release|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Release|Win32.Build.0 = Release|Win32 {37F9EF6B-F69C-4764-9687-C63C608C476B}.Release|x64.ActiveCfg = Release|Win32 {3102A61F-3025-482C-9515-9FC239746658}.Debug|.NET.ActiveCfg = Debug|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Debug|Any CPU.Build.0 = Debug|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Debug|Win32.ActiveCfg = Debug|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Debug|x64.ActiveCfg = Debug|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Release|.NET.ActiveCfg = Release|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Release|Any CPU.ActiveCfg = Release|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Release|Any CPU.Build.0 = Release|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Release|Mixed Platforms.Build.0 = Release|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Release|Win32.ActiveCfg = Release|Any CPU {3102A61F-3025-482C-9515-9FC239746658}.Release|x64.ActiveCfg = Release|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Debug|.NET.ActiveCfg = Debug|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Debug|Any CPU.Build.0 = Debug|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Debug|Win32.ActiveCfg = Debug|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Debug|x64.ActiveCfg = Debug|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Release|.NET.ActiveCfg = Release|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Release|Any CPU.ActiveCfg = Release|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Release|Any CPU.Build.0 = Release|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Release|Mixed Platforms.Build.0 = Release|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Release|Win32.ActiveCfg = Release|Any CPU {83C13931-B27C-425C-AAF0-5F96EEA4F173}.Release|x64.ActiveCfg = Release|Any CPU {35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|.NET.ActiveCfg = Debug|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|Any CPU.ActiveCfg = Debug|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|Win32.ActiveCfg = Debug|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|Win32.Build.0 = Debug|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|x64.ActiveCfg = Debug|x64 {35A23A16-EF17-4CC3-8854-785025A304F3}.Debug|x64.Build.0 = Debug|x64 {35A23A16-EF17-4CC3-8854-785025A304F3}.Release|.NET.ActiveCfg = Release|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Release|Any CPU.ActiveCfg = Release|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Release|Mixed Platforms.ActiveCfg = Release|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Release|Mixed Platforms.Build.0 = Release|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Release|Win32.ActiveCfg = Release|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Release|Win32.Build.0 = Release|Win32 {35A23A16-EF17-4CC3-8854-785025A304F3}.Release|x64.ActiveCfg = Release|x64 {35A23A16-EF17-4CC3-8854-785025A304F3}.Release|x64.Build.0 = Release|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Debug|.NET.ActiveCfg = Debug|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Debug|Any CPU.ActiveCfg = Debug|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Debug|Mixed Platforms.Build.0 = Debug|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Debug|Win32.ActiveCfg = Debug|Win32 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Debug|Win32.Build.0 = Debug|Win32 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Debug|x64.ActiveCfg = Debug|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Release|.NET.ActiveCfg = Release|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Release|Any CPU.ActiveCfg = Release|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Release|Mixed Platforms.ActiveCfg = Release|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Release|Mixed Platforms.Build.0 = Release|x64 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Release|Win32.ActiveCfg = Release|Win32 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Release|Win32.Build.0 = Release|Win32 {FE99DB39-DAB7-43BD-BF08-6549FAB88C13}.Release|x64.ActiveCfg = Release|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Debug|.NET.ActiveCfg = Debug|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Debug|Any CPU.ActiveCfg = Debug|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Debug|Mixed Platforms.Build.0 = Debug|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Debug|Win32.ActiveCfg = Debug|Win32 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Debug|Win32.Build.0 = Debug|Win32 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Debug|x64.ActiveCfg = Debug|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Release|.NET.ActiveCfg = Release|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Release|Any CPU.ActiveCfg = Release|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Release|Mixed Platforms.ActiveCfg = Release|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Release|Mixed Platforms.Build.0 = Release|x64 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Release|Win32.ActiveCfg = Release|Win32 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Release|Win32.Build.0 = Release|Win32 {322CD167-C8F9-4E13-8F8A-DFAE834255AA}.Release|x64.ActiveCfg = Release|x64 {92551430-7C30-421B-A81E-0B08163AC59C}.Debug|.NET.ActiveCfg = Debug|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Debug|Any CPU.Build.0 = Debug|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Debug|Win32.ActiveCfg = Debug|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Debug|x64.ActiveCfg = Debug|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Release|.NET.ActiveCfg = Release|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Release|Any CPU.ActiveCfg = Release|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Release|Any CPU.Build.0 = Release|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Release|Mixed Platforms.Build.0 = Release|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Release|Win32.ActiveCfg = Release|Any CPU {92551430-7C30-421B-A81E-0B08163AC59C}.Release|x64.ActiveCfg = Release|Any CPU {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|.NET.ActiveCfg = Debug|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|Any CPU.ActiveCfg = Debug|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|Mixed Platforms.Build.0 = Debug|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|Win32.ActiveCfg = Debug|Win32 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|Win32.Build.0 = Debug|Win32 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|x64.ActiveCfg = Debug|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Debug|x64.Build.0 = Debug|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|.NET.ActiveCfg = Release|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|Any CPU.ActiveCfg = Release|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|Mixed Platforms.ActiveCfg = Release|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|Mixed Platforms.Build.0 = Release|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|Win32.ActiveCfg = Release|Win32 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|Win32.Build.0 = Release|Win32 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|x64.ActiveCfg = Release|x64 {08C3286F-F132-44EC-80F0-2DF30D87A5D3}.Release|x64.Build.0 = Release|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Debug|.NET.ActiveCfg = Debug|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Debug|Any CPU.ActiveCfg = Debug|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Debug|Mixed Platforms.Build.0 = Debug|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Debug|Win32.ActiveCfg = Debug|Win32 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Debug|Win32.Build.0 = Debug|Win32 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Debug|x64.ActiveCfg = Debug|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Release|.NET.ActiveCfg = Release|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Release|Any CPU.ActiveCfg = Release|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Release|Mixed Platforms.ActiveCfg = Release|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Release|Mixed Platforms.Build.0 = Release|x64 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Release|Win32.ActiveCfg = Release|Win32 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Release|Win32.Build.0 = Release|Win32 {979D51D1-AB6B-482D-AC3F-C5B226CFB904}.Release|x64.ActiveCfg = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal selenium-2.25.0/WebDriver.snk000644 000765 000120 00000001124 11754421257 017323 0ustar00davidburnsadmin000000 000000 $RSA2wcQ)?f& SoF x{F$XxeS2b9Wq==Y␨*@7\Ubh $$L@SQFkuTt487v8MW3ҥ3<,"  X.<2N  n03> ̍ ᚋXJ07* A-򔃾BًHV-e(L\P2>۟)|cs2$IJ#; C8'=s_uM #4p]gDAƼS5k#<Æ_e".c\Zn3-c2Rh9 Pg3e!אak_R yGa@cJūv[VvՖVnJ앉!!GlaeUqµ|=gKjg mƌBhIfTj3.Ή^l=! PKk=AJvselenium-2.25.0/wire.py000644 000765 000120 00000226444 12001524164 016236 0ustar00davidburnsadmin000000 000000 # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Script for generating the wire protocol wiki documentation. This script is probably overkill, but it ensures commands are documented with consistent formatting. Usage: python trunk/wire.py --help """ import logging import optparse import os import re import sys DEFAULT_WIKI_PATH = os.path.join('..', 'wiki', 'JsonWireProtocol.wiki') class Resource(object): def __init__(self, path): self.path = path self.methods = [] def __getattribute__(self, attr): try: return super(Resource, self).__getattribute__(attr) except AttributeError, e: if self.methods: return self.methods[len(self.methods) - 1].__getattribute__(attr) raise e def Post(self, summary): return self.AddMethod(Method(self, 'POST', summary)) def Get(self, summary): return self.AddMethod(Method(self, 'GET', summary)) def Delete(self, summary): return self.AddMethod(Method(self, 'DELETE', summary)) def AddMethod(self, method): self.methods.append(method) return self def ToWikiString(self): str = '=== %s ===\n' % self.path for method in self.methods: str = '%s%s' % (str, method.ToWikiString(self.path)) return str def ToWikiTableString(self): return ''.join(m.ToWikiTableString() for m in self.methods) class SessionResource(Resource): def AddMethod(self, method): return (Resource.AddMethod(self, method). AddUrlParameter(':sessionId', 'ID of the session to route the command to.')) class ElementResource(SessionResource): def AddMethod(self, method): return (SessionResource.AddMethod(self, method). AddUrlParameter(':id', 'ID of the element to route the command to.'). AddError('StaleElementReference', 'If the element referenced by `:id` is no longer attached ' 'to the page\'s DOM.')) def RequiresVisibility(self): return self.AddError('ElementNotVisible', 'If the referenced element is not visible on the page ' '(either is hidden by CSS, has 0-width, or has 0-height)') def RequiresEnabledState(self): return self.AddError('InvalidElementState', 'If the referenced element is disabled.') class Method(object): def __init__(self, parent, method, summary): self.parent = parent self.method = method self.summary = summary self.url_parameters = [] self.json_parameters = [] self.return_type = None self.errors = {} def AddUrlParameter(self, name, description): self.url_parameters.append({ 'name': name, 'desc': description}) return self.parent def AddJsonParameter(self, name, type, description): self.json_parameters.append({ 'name': name, 'type': type, 'desc': description}) return self.parent def AddError(self, type, summary): self.errors[type] = {'type': type, 'summary': summary} return self.parent def SetReturnType(self, type, description): self.return_type = { 'type': type, 'desc': description} return self.parent def _GetUrlParametersWikiString(self): if not self.url_parameters: return '' return '''
*URL Parameters:*
%s
''' % '\n'.join('
`%s` - %s
' % (param['name'], param['desc']) for param in self.url_parameters) def _GetJsonParametersWikiString(self): if not self.json_parameters: return '' return '''
*JSON Parameters:*
%s
''' % '\n'.join('
`%s` - `%s` %s
' % (param['name'], param['type'], param['desc']) for param in self.json_parameters) def _GetReturnTypeWikiString(self): if not self.return_type: return '' type = '' if self.return_type['type']: type = '`%s` ' % self.return_type['type'] return '''
*Returns:*
%s%s
''' % (type, self.return_type['desc']) def _GetErrorWikiString(self): if not self.errors.values(): return '' return '''
*Potential Errors:*
%s
''' % '\n'.join('
`%s` - %s
' % (error['type'], error['summary']) for error in self.errors.values()) def ToWikiString(self, path): return '''
==== %s %s ====
%s
%s%s%s%s
''' % (self.method, path, self.summary, self._GetUrlParametersWikiString(), self._GetJsonParametersWikiString(), self._GetReturnTypeWikiString(), self._GetErrorWikiString()) def ToWikiTableString(self): return '|| %s || [#%s_%s %s] || %s ||\n' % ( self.method, self.method, self.parent.path, self.parent.path, self.summary[:self.summary.find('.') + 1].replace('\n', '').strip()) class ErrorCode(object): def __init__(self, code, summary, detail): self.code = code self.summary = summary self.detail = detail def ToWikiTableString(self): return '|| %d || `%s` || %s ||' % (self.code, self.summary, self.detail) class AbstractErrorCodeGatherer(object): def __init__(self, name, path_to_error_codes, regex): self.name = name self.path_to_error_codes = path_to_error_codes self.regex = regex def __str__(self): return self.name def get_error_codes(self): error_codes = {} error_codes_file = open(self.path_to_error_codes, 'r') try: for line in error_codes_file: match = self.regex.match(line) if match is not None: name, code = self.extract_from_match(match) error_codes[code] = name finally: error_codes_file.close() return error_codes def extract_from_match(self, match): raise NotImplementedError class JavaErrorCodeGatherer(AbstractErrorCodeGatherer): def __init__(self, path_to_error_codes): super(JavaErrorCodeGatherer, self).__init__( \ 'Java', path_to_error_codes, \ re.compile('^\s*public static final int ([A-Z_]+) = (\d+);$')) def extract_from_match(self, match): return match.group(1), int(match.group(2)) class JavascriptErrorCodeGatherer(AbstractErrorCodeGatherer): def __init__(self, path_to_error_codes, name): super(JavascriptErrorCodeGatherer, self).__init__( \ name, path_to_error_codes, \ re.compile('^\s*([A-Z_]+): (\d+)')) def extract_from_match(self, match): return match.group(1), int(match.group(2)) class RubyErrorCodeGatherer(AbstractErrorCodeGatherer): def __init__(self, path_to_error_codes): super(RubyErrorCodeGatherer, self).__init__( \ 'Ruby', path_to_error_codes, \ re.compile('^\s*(([A-Z][a-z]*)+),?\s*# (\d+)$')) def extract_from_match(self, match): return match.group(1), int(match.group(len(match.groups()))) class PythonErrorCodeGatherer(AbstractErrorCodeGatherer): def __init__(self, path_to_error_codes): super(PythonErrorCodeGatherer, self).__init__( \ 'Python', path_to_error_codes, \ re.compile('^\s*([A-Z_]+) = (\d+)$')) def extract_from_match(self, match): return match.group(1), int(match.group(2)) class CErrorCodeGatherer(AbstractErrorCodeGatherer): def __init__(self, path_to_error_codes): super(CErrorCodeGatherer, self).__init__( \ 'C', path_to_error_codes, \ re.compile('^#define ([A-Z]+)\s+(\d+)$')) def extract_from_match(self, match): return match.group(1), int(match.group(2)) class CSharpErrorCodeGatherer(AbstractErrorCodeGatherer): def __init__(self, path_to_error_codes): super(CSharpErrorCodeGatherer, self).__init__( \ 'C#', path_to_error_codes, \ re.compile('^\s*(([A-Z][a-z]*)+) = (\d+)')) def extract_from_match(self, match): return match.group(1), int(match.group(len(match.groups()))) class ErrorCodeChecker(object): def __init__(self): self.gatherers = [] self.inconsistencies = {} def using(self, gatherer): self.gatherers.append(gatherer) return self def check_error_codes_are_consistent(self, json_error_codes): logging.info('Checking error codes are consistent across languages and \ browsers') num_missing = 0 for gatherer in self.gatherers: if not os.path.exists(gatherer.path_to_error_codes): logging.warn(' Unable to locate error codes for %s (//%s)', gatherer, gatherer.path_to_error_codes) num_missing += 1 else: self.compare(gatherer, json_error_codes) if not num_missing and not self.inconsistencies: logging.info('All error codes are consistent') return False for code,(present,missing) in self.inconsistencies.items(): logging.error('Error code %d was present in %s but not %s', code, present, missing) return True def add_inconsistency(self, code, present_in, missing_from): if self.inconsistencies.has_key(code): already_present, already_missing = self.inconsistencies[code] already_present.add(present_in) already_missing.add(missing_from) else: self.inconsistencies[code] = (set([present_in]), set([missing_from])) def compare(self, gatherer, raw_json_error_codes): logging.info('Checking %s (%s)' % (gatherer, gatherer.path_to_error_codes)) gathered_error_codes = gatherer.get_error_codes() json_error_codes = map(lambda code: code.code, raw_json_error_codes) for json_error_code in json_error_codes: if not gathered_error_codes.has_key(json_error_code): self.add_inconsistency(json_error_code, 'JSON', str(gatherer)) for gathered_code,_ in gathered_error_codes.items(): if not gathered_code in json_error_codes: self.add_inconsistency(gathered_code, str(gatherer), 'JSON') def GetDefaultWikiPath(): dirname = os.path.dirname(__file__) if not dirname: return DEFAULT_WIKI_PATH return os.path.join('.', dirname, DEFAULT_WIKI_PATH) def ChangeToTrunk(): dirname = os.path.dirname(__file__) if dirname: logging.info('Changing to %s', os.path.abspath(dirname)) os.chdir(dirname) def main(): logging.basicConfig(format='[ %(filename)s ] %(message)s', level=logging.INFO) default_path = GetDefaultWikiPath() parser = optparse.OptionParser('Usage: %prog [options]') parser.add_option('-c', '--check_error_codes', dest='check_errors', default=False, help='Whether to abort if error codes are inconsistent.') parser.add_option('-w', '--wiki', dest='wiki', metavar='FILE', default=default_path, help='Which file to write to. Defaults to %default') (options, args) = parser.parse_args() wiki_path = options.wiki if wiki_path is not default_path: wiki_path = os.path.abspath(wiki_path) if not os.path.exists(wiki_path): logging.error('Unable to locate wiki file: %s', wiki_path) parser.print_help() sys.exit(2) wiki_path = os.path.abspath(wiki_path) ChangeToTrunk() error_codes = [ ErrorCode(0, 'Success', 'The command executed successfully.'), # ErrorCode(1, 'IndexOutOfBounds', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), # ErrorCode(2, 'NoCollection', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), # ErrorCode(3, 'NoString', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), # ErrorCode(4, 'NoStringLength', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), # ErrorCode(5, 'NoStringWrapper', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), # ErrorCode(6, 'NoSuchDriver', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), ErrorCode(7, 'NoSuchElement', 'An element could not be located on the \ page using the given search parameters.'), ErrorCode(8, 'NoSuchFrame', 'A request to switch to a frame could not be \ satisfied because the frame could not be found.'), ErrorCode(9, 'UnknownCommand', 'The requested resource could not be \ found, or a request was received using an HTTP method that is not supported \ by the mapped resource.'), ErrorCode(10, 'StaleElementReference', 'An element command failed \ because the referenced element is no longer attached to the DOM.'), ErrorCode(11, 'ElementNotVisible', 'An element command could not \ be completed because the element is not visible on the page.'), ErrorCode(12, 'InvalidElementState', 'An element command could not be \ completed because the element is in an invalid state (e.g. attempting to \ click a disabled element).'), ErrorCode(13, 'UnknownError', 'An unknown server-side error occurred \ while processing the command.'), # ErrorCode(14, 'ExpectedError', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), ErrorCode(15, 'ElementIsNotSelectable', 'An attempt was made to select \ an element that cannot be selected.'), # ErrorCode(16, 'NoSuchDocument', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), ErrorCode(17, 'JavaScriptError', 'An error occurred while executing user \ supplied !JavaScript.'), # ErrorCode(18, 'NoScriptResult', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), ErrorCode(19, 'XPathLookupError', 'An error occurred while searching for \ an element by XPath.'), # ErrorCode(20, 'NoSuchCollection', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), ErrorCode(21, 'Timeout', 'An operation did not complete before its \ timeout expired.'), # ErrorCode(22, 'NullPointer', 'This is probably an unused \ #implementation detail of an old version of the IEDriver.'), ErrorCode(23, 'NoSuchWindow', 'A request to switch to a different window \ could not be satisfied because the window could not be found.'), ErrorCode(24, 'InvalidCookieDomain', 'An illegal attempt was made to set \ a cookie under a different domain than the current page.'), ErrorCode(25, 'UnableToSetCookie', 'A request to set a cookie\'s value \ could not be satisfied.'), ErrorCode(26, 'UnexpectedAlertOpen', 'A modal dialog was open, blocking \ this operation'), ErrorCode(27, 'NoAlertOpenError', 'An attempt was made to operate on a \ modal dialog when one was not open.'), ErrorCode(28, 'ScriptTimeout', 'A script did not complete before its \ timeout expired.'), ErrorCode(29, 'InvalidElementCoordinates', 'The coordinates provided to \ an interactions operation are invalid.'), ErrorCode(30, 'IMENotAvailable', 'IME was not available.'), ErrorCode(31, 'IMEEngineActivationFailed', 'An IME engine could not be \ started.'), ErrorCode(32, 'InvalidSelector', 'Argument was an invalid selector \ (e.g. XPath/CSS).'), ErrorCode(33, 'SessionNotCreatedException', 'A new session could not be created.'), ErrorCode(34, 'MoveTargetOutOfBounds', 'Target provided for a move action is out of bounds.') ] error_checker = ErrorCodeChecker() \ .using(JavaErrorCodeGatherer('java/client/src/org/openqa/selenium/remote/ErrorCodes.java')) \ .using(JavascriptErrorCodeGatherer('javascript/atoms/error.js', 'Javascript atoms')) \ .using(JavascriptErrorCodeGatherer('javascript/firefox-driver/js/errorcode.js', 'Javascript firefox driver')) \ .using(RubyErrorCodeGatherer('rb/lib/selenium/webdriver/common/error.rb')) \ .using(PythonErrorCodeGatherer('py/selenium/webdriver/remote/errorhandler.py')) \ .using(CErrorCodeGatherer('cpp/webdriver-interactions/errorcodes.h')) \ .using(CSharpErrorCodeGatherer('dotnet/src/WebDriver/WebDriverResult.cs')) if (not error_checker.check_error_codes_are_consistent(error_codes) and options.check_errors): sys.exit(1) resources = [] resources.append(Resource('/status'). Get(''' Query the server\'s current status. The server should respond with a general \ "HTTP 200 OK" response if it is alive and accepting commands. The response \ body should be a JSON object describing the state of the server. All server \ implementations should return two basic objects describing the server's \ current platform and when the server was built. All fields are optional; \ if omitted, the client should assume the value is uknown. Furthermore, \ server implementations may include additional fields not listed here. || *Key* || *Type* || *Description* || || build || object || || || build.version || string || A generic release label (i.e. "2.0rc3") || || build.revision || string || The revision of the local source control client \ from which the server was built || || build.time || string || A timestamp from when the server was built. || || os || object || || || os.arch || string || The current system architecture. || || os.name || string || The name of the operating system the server is \ currently running on: "windows", "linux", etc. || || os.version || string || The operating system version. || '''). SetReturnType('{object}', 'An object describing the general status of the server.')) resources.append( Resource('/session'). Post(''' Create a new session. The server should attempt to create a session that most \ closely matches the desired and required capabilities. Required capabilities \ have higher priority than desired capabilities and must be set for the session \ to be created.'''). AddJsonParameter('desiredCapabilities', '{object}', 'An object describing the session\'s ' '[#Desired_Capabilities desired capabilities].'). AddJsonParameter('requiredCapabilities', '{object}', 'An object describing the session\'s ' '[#Desired_Capabilities required capabilities] (Optional).'). SetReturnType(None, 'A `303 See Other` redirect to `/session/:sessionId`, where' ' `:sessionId` is the ID of the newly created session.'). AddError('SessionNotCreatedException', 'If a required capability could not be set.')) resources.append( Resource('/sessions'). Get(''' Returns a list of the currently active sessions. Each session will be \ returned as a list of JSON objects with the following keys: || *Key* || *Type* || *Description || || id || string || The session ID. || || capabilities || object || An object describing the session's \ [#Actual_Capabilities capabilities]. || '''). SetReturnType('{Array.}', 'A list of the currently active sessions.')) resources.append( SessionResource('/session/:sessionId'). Get('Retrieve the capabilities of the specified session.'). SetReturnType('{object}', 'An object describing the session\'s ' '[#Actual_Capabilities capabilities].'). Delete('Delete the session.')) resources.append( SessionResource('/session/:sessionId/timeouts'). Post(''' Configure the amount of time that a particular type of operation can execute \ for before they are aborted and a |Timeout| error is returned to the \ client.'''). AddJsonParameter('type', '{string}', 'The type of operation to set the timeout for. Valid \ values are: "script" for script timeouts, "implicit" for modifying the \ implicit wait timeout and "page load" for setting a page load timeout.'). AddJsonParameter('ms', '{number}', 'The amount of time, in milliseconds, that time-limited' ' commands are permitted to run.')) resources.append( SessionResource('/session/:sessionId/timeouts/async_script'). Post('''Set the amount of time, in milliseconds, that asynchronous \ scripts executed by `/session/:sessionId/execute_async` are permitted to run \ before they are aborted and a |Timeout| error is returned to the client.'''). AddJsonParameter('ms', '{number}', 'The amount of time, in milliseconds, that time-limited' ' commands are permitted to run.')) resources.append( SessionResource('/session/:sessionId/timeouts/implicit_wait'). Post('''Set the amount of time the driver should wait when searching for \ elements. When searching for a single element, the driver should poll the page until an \ element is found or the timeout expires, whichever occurs first. When searching for multiple \ elements, the driver should poll the page until at least one element is found or the timeout \ expires, at which point it should return an empty list. If this command is never sent, the driver should default to an implicit wait of\ 0ms.'''). AddJsonParameter('ms', '{number}', 'The amount of time to wait, in milliseconds. This value' ' has a lower bound of 0.')) resources.append( SessionResource('/session/:sessionId/window_handle'). Get('Retrieve the current window handle.'). SetReturnType('{string}', 'The current window handle.')) resources.append( SessionResource('/session/:sessionId/window_handles'). Get('Retrieve the list of all window handles available to the session.'). SetReturnType('{Array.}', 'A list of window handles.')) resources.append( SessionResource('/session/:sessionId/url'). Get('Retrieve the URL of the current page.'). SetReturnType('{string}', 'The current URL.'). Post('Navigate to a new URL.'). AddJsonParameter('url', '{string}', 'The URL to navigate to.')) resources.append( SessionResource('/session/:sessionId/forward'). Post('Navigate forwards in the browser history, if possible.')) resources.append( SessionResource('/session/:sessionId/back'). Post('Navigate backwards in the browser history, if possible.')) resources.append( SessionResource('/session/:sessionId/refresh'). Post('Refresh the current page.')) resources.append( SessionResource('/session/:sessionId/execute'). Post(''' Inject a snippet of !JavaScript into the page for execution in the context of \ the currently selected frame. The executed script is assumed to be \ synchronous and the result of evaluating the script is returned to the client. The `script` argument defines the script to execute in the form of a \ function body. The value returned by that function will be returned to the \ client. The function will be invoked with the provided `args` array and the \ values may be accessed via the `arguments` object in the order specified. Arguments may be any JSON-primitive, array, or JSON object. JSON objects that \ define a [#WebElement_JSON_Object WebElement reference] will be converted to \ the corresponding DOM element. Likewise, any !WebElements in the script result \ will be returned to the client as [#WebElement_JSON_Object WebElement \ JSON objects].'''). AddJsonParameter('script', '{string}', 'The script to execute.'). AddJsonParameter('args', '{Array.<*>}', 'The script arguments.'). AddError('JavaScriptError', 'If the script throws an Error.'). AddError('StaleElementReference', 'If one of the script arguments is a !WebElement that is not ' 'attached to the page\'s DOM.'). SetReturnType('{*}', 'The script result.')) resources.append( SessionResource('/session/:sessionId/execute_async'). Post(''' Inject a snippet of !JavaScript into the page for execution in the context of \ the currently selected frame. The executed script is assumed to be \ asynchronous and must signal that is done by invoking the provided callback, \ which is always provided as the final argument to the function. The value \ to this callback will be returned to the client. Asynchronous script commands may not span page loads. If an `unload` event is \ fired while waiting for a script result, an error should be returned to the \ client. The `script` argument defines the script to execute in teh form of a function \ body. The function will be invoked with the provided `args` array and the \ values may be accessed via the `arguments` object in the order specified. The \ final argument will always be a callback function that must be invoked to \ signal that the script has finished. Arguments may be any JSON-primitive, array, or JSON object. JSON objects that \ define a [#WebElement_JSON_Object WebElement reference] will be converted to \ the corresponding DOM element. Likewise, any !WebElements in the script result \ will be returned to the client as [#WebElement_JSON_Object WebElement \ JSON objects].'''). AddJsonParameter('script', '{string}', 'The script to execute.'). AddJsonParameter('args', '{Array.<*>}', 'The script arguments.'). AddError('JavaScriptError', 'If the script throws an Error or if an `unload` event is ' 'fired while waiting for the script to finish.'). AddError('StaleElementReference', 'If one of the script arguments is a !WebElement that is not ' 'attached to the page\'s DOM.'). AddError('Timeout', 'If the script callback is not invoked before the timout ' 'expires. Timeouts are controlled by the ' '`/session/:sessionId/timeout/async_script` command.'). SetReturnType('{*}', 'The script result.')) resources.append( SessionResource('/session/:sessionId/screenshot'). Get('Take a screenshot of the current page.'). SetReturnType('{string}', 'The screenshot as a base64 encoded PNG.')) resources.append( SessionResource('/session/:sessionId/ime/available_engines'). Get('List all available engines on the machine. To use an engine, it has to be present in this list.'). AddError('ImeNotAvailableException', 'If the host does not support IME'). SetReturnType('{Array.}', 'A list of available engines')) resources.append( SessionResource('/session/:sessionId/ime/active_engine'). Get('Get the name of the active IME engine. The name string is platform specific.'). AddError('ImeNotAvailableException', 'If the host does not support IME'). SetReturnType('{string}', 'The name of the active IME engine.')) resources.append( SessionResource('/session/:sessionId/ime/activated'). Get('Indicates whether IME input is active at the moment (not if it\'s available.'). AddError('ImeNotAvailableException', 'If the host does not support IME'). SetReturnType('{boolean}', 'true if IME input is available and currently active, false otherwise')) resources.append( SessionResource('/session/:sessionId/ime/deactivate'). Post('De-activates the currently-active IME engine.'). AddError('ImeNotAvailableException', 'If the host does not support IME')) resources.append( SessionResource('/session/:sessionId/ime/activate'). Post('''Make an engines that is available (appears on the list returned by getAvailableEngines) active. After this call, the engine will be added to the list of engines loaded in the IME daemon and the input sent using sendKeys will be converted by the active engine. Note that this is a platform-independent method of activating IME (the platform-specific way being using keyboard shortcuts'''). AddJsonParameter('engine', '{string}', 'Name of the engine to activate.'). AddError('ImeActivationFailedException', 'If the engine is not available or if the activation fails for other reasons.'). AddError('ImeNotAvailableException', 'If the host does not support IME')) resources.append( SessionResource('/session/:sessionId/frame'). Post('''Change focus to another frame on the page. If the frame `id` is \ `null`, the server should switch to the page's default content.'''). AddJsonParameter('id', '{string|number|null|WebElement JSON Object}', 'Identifier for the frame to change focus to.'). AddError('NoSuchFrame', 'If the frame specified by `id` cannot be found.')) resources.append( SessionResource('/session/:sessionId/window'). Post('''Change focus to another window. The window to change focus to \ may be specified by its server assigned window handle, or by the value of its `name` attribute.'''). AddJsonParameter('name', '{string}', 'The window to change focus to.'). Delete('''Close the current window.'''). AddError('NoSuchWindow', 'If the window specified by `name` cannot be found.')) resources.append( SessionResource('/session/:sessionId/window/:windowHandle/size'). Post('''Change the size of the specified window. If the :windowHandle URL \ parameter is "current", the currently active window will be resized.'''). AddJsonParameter('width', '{number}', 'The new window width.'). AddJsonParameter('height', '{number}', 'The new window height.'). Get('''Get the size of the specified window. If the :windowHandle URL \ parameter is "current", the size of the currently active window will be returned.'''). SetReturnType('{width: number, height: number}', 'The size of the window.'). AddError('NoSuchWindow', 'If the specified window cannot be found.')) resources.append( SessionResource('/session/:sessionId/window/:windowHandle/position'). Post('''Change the position of the specified window. If the :windowHandle URL \ parameter is "current", the currently active window will be moved.'''). AddJsonParameter('x', '{number}', 'The X coordinate to position the window at, \ relative to the upper left corner of the screen.'). AddJsonParameter('y', '{number}', 'The Y coordinate to position the window at, \ relative to the upper left corner of the screen.'). Get('''Get the position of the specified window. If the :windowHandle URL \ parameter is "current", the position of the currently active window will be returned.'''). SetReturnType('{x: number, y: number}', 'The X and Y coordinates for the window, \ relative to the upper left corner of the screen.'). AddError('NoSuchWindow', 'If the specified window cannot be found.')) resources.append( SessionResource('/session/:sessionId/window/:windowHandle/maximize'). Post('''Maximize the specified window if not already maximized. If the \ :windowHandle URL parameter is "current", the currently active window will be \ maximized.'''). AddError('NoSuchWindow', 'If the specified window cannot be found.')) resources.append( SessionResource('/session/:sessionId/cookie'). Get('Retrieve all cookies visible to the current page.'). SetReturnType('{Array.}', 'A list of [#Cookie_JSON_Object cookies].'). Post('''Set a cookie. If the [#Cookie_JSON_Object cookie] path is not \ specified, it should be set to `"/"`. Likewise, if the domain is omitted, it \ should default to the current page's domain.'''). AddJsonParameter('cookie', '{object}', 'A [#Cookie_JSON_Object JSON object] defining the ' 'cookie to add.'). Delete('''Delete all cookies visible to the current page.'''). AddError('InvalidCookieDomain', 'If the cookie\'s `domain` is not visible from the current page.'). AddError('UnableToSetCookie', 'If attempting to set a cookie on a page that does not support ' 'cookies (e.g. pages with mime-type `text/plain`).')) resources.append( SessionResource('/session/:sessionId/cookie/:name'). Delete('''Delete the cookie with the given name. This command should be \ a no-op if there is no such cookie visible to the current page.'''). AddUrlParameter(':name', 'The name of the cookie to delete.')) resources.append( SessionResource('/session/:sessionId/source'). Get('Get the current page source.'). SetReturnType('{string}', 'The current page source.')) resources.append( SessionResource('/session/:sessionId/title'). Get('Get the current page title.'). SetReturnType('{string}', 'The current page title.')) resources.append( SessionResource('/session/:sessionId/element'). Post('''Search for an element on the page, starting from the document \ root. The located element will be returned as a WebElement JSON object. \ The table below lists the locator strategies that each server should support. \ Each locator must return the first matching element located in the DOM. || *Strategy* || *Description* || || class name || Returns an element whose class name contains the search \ value; compound class names are not permitted. || || css selector || Returns an element matching a CSS selector. || || id || Returns an element whose ID attribute matches the search value. || || name || Returns an element whose NAME attribute matches the search value. || || link text || Returns an anchor element whose visible text matches the \ search value. || || partial link text || Returns an anchor element whose visible text \ partially matches the search value. || || tag name || Returns an element whose tag name matches the search value. || || xpath || Returns an element matching an XPath expression. || '''). AddJsonParameter('using', '{string}', 'The locator strategy to use.'). AddJsonParameter('value', '{string}', 'The The search target.'). SetReturnType('{ELEMENT:string}', 'A WebElement JSON object for the located element.'). AddError('XPathLookupError', 'If using XPath and the input expression is invalid.'). AddError('NoSuchElement', 'If the element cannot be found.')) resources.append( SessionResource('/session/:sessionId/elements'). Post('''Search for multiple elements on the page, starting from the \ document root. The located elements will be returned as a WebElement JSON \ objects. The table below lists the locator strategies that each server should \ support. Elements should be returned in the order located in the DOM. || *Strategy* || *Description* || || class name || Returns all elements whose class name contains the search \ value; compound class names are not permitted. || || css selector || Returns all elements matching a CSS selector. || || id || Returns all elements whose ID attribute matches the search value. || || name || Returns all elements whose NAME attribute matches the search value. || || link text || Returns all anchor elements whose visible text matches the \ search value. || || partial link text || Returns all anchor elements whose visible text \ partially matches the search value. || || tag name || Returns all elements whose tag name matches the search value. || || xpath || Returns all elements matching an XPath expression. || '''). AddJsonParameter('using', '{string}', 'The locator strategy to use.'). AddJsonParameter('value', '{string}', 'The The search target.'). SetReturnType('{Array.<{ELEMENT:string}>}', 'A list of WebElement JSON objects for the located elements.'). AddError('XPathLookupError', 'If using XPath and the input expression is invalid.')) resources.append( SessionResource('/session/:sessionId/element/active'). Post('Get the element on the page that currently has focus. The element will be returned as ' 'a WebElement JSON object.'). SetReturnType('{ELEMENT:string}', 'A WebElement JSON object for the active element.')) resources.append( ElementResource('/session/:sessionId/element/:id'). Get('''Describe the identified element. *Note:* This command is reserved for future use; its return type is currently \ undefined.''')) resources.append( ElementResource('/session/:sessionId/element/:id/element'). Post('''Search for an element on the page, starting from the identified \ element. The located element will be returned as a WebElement JSON object. \ The table below lists the locator strategies that each server should support. \ Each locator must return the first matching element located in the DOM. || *Strategy* || *Description* || || class name || Returns an element whose class name contains the search \ value; compound class names are not permitted. || || css selector || Returns an element matching a CSS selector. || || id || Returns an element whose ID attribute matches the search value. || || name || Returns an element whose NAME attribute matches the search value. || || link text || Returns an anchor element whose visible text matches the \ search value. || || partial link text || Returns an anchor element whose visible text \ partially matches the search value. || || tag name || Returns an element whose tag name matches the search value. || || xpath || Returns an element matching an XPath expression. The provided \ XPath expression must be applied to the server "as is"; if the expression is \ not relative to the element root, the server should not modify it. \ Consequently, an XPath query may return elements not contained in the root \ element's subtree. || '''). AddJsonParameter('using', '{string}', 'The locator strategy to use.'). AddJsonParameter('value', '{string}', 'The The search target.'). SetReturnType('{ELEMENT:string}', 'A WebElement JSON object for the located element.'). AddError('NoSuchElement', 'If the element cannot be found.'). AddError('XPathLookupError', 'If using XPath and the input expression is invalid.')) resources.append( ElementResource('/session/:sessionId/element/:id/elements'). Post('''Search for multiple elements on the page, starting from the \ identified element. The located elements will be returned as a WebElement \ JSON objects. The table below lists the locator strategies that each server \ should support. Elements should be returned in the order located in the DOM. || *Strategy* || *Description* || || class name || Returns all elements whose class name contains the search \ value; compound class names are not permitted. || || css selector || Returns all elements matching a CSS selector. || || id || Returns all elements whose ID attribute matches the search value. || || name || Returns all elements whose NAME attribute matches the search value. || || link text || Returns all anchor elements whose visible text matches the \ search value. || || partial link text || Returns all anchor elements whose visible text \ partially matches the search value. || || tag name || Returns all elements whose tag name matches the search value. || || xpath || Returns all elements matching an XPath expression. The provided \ XPath expression must be applied to the server "as is"; if the expression is \ not relative to the element root, the server should not modify it. \ Consequently, an XPath query may return elements not contained in the root \ element's subtree. || '''). AddJsonParameter('using', '{string}', 'The locator strategy to use.'). AddJsonParameter('value', '{string}', 'The The search target.'). SetReturnType('{Array.<{ELEMENT:string}>}', 'A list of WebElement JSON objects for the located elements.'). AddError('XPathLookupError', 'If using XPath and the input expression is invalid.')) resources.append( ElementResource('/session/:sessionId/element/:id/click'). Post('Click on an element.'). RequiresVisibility()) resources.append( ElementResource('/session/:sessionId/element/:id/submit'). Post('Submit a `FORM` element. The submit command may also be applied to any element that is ' 'a descendant of a `FORM` element.')) resources.append( ElementResource('/session/:sessionId/element/:id/text'). Get('Returns the visible text for the element.')) resources.append( ElementResource('/session/:sessionId/element/:id/value'). Post('''Send a sequence of key strokes to an element. Any UTF-8 character may be specified, however, if the server does not support \ native key events, it should simulate key strokes for a standard US keyboard \ layout. The Unicode [http://unicode.org/faq/casemap_charprop.html#8 Private Use\ Area] code points, 0xE000-0xF8FF, are used to represent pressable, non-text \ keys (see table below).
|| *Key* || *Code* || || NULL || U+E000 || || Cancel || U+E001 || || Help || U+E002 || || Back space || U+E003 || || Tab || U+E004 || || Clear || U+E005 || || Return^1^ || U+E006 || || Enter^1^ || U+E007 || || Shift || U+E008 || || Control || U+E009 || || Alt || U+E00A || || Pause || U+E00B || || Escape || U+E00C || || *Key* || *Code* || || Space || U+E00D || || Pageup || U+E00E || || Pagedown || U+E00F || || End || U+E010 || || Home || U+E011 || || Left arrow || U+E012 || || Up arrow || U+E013 || || Right arrow || U+E014 || || Down arrow || U+E015 || || Insert || U+E016 || || Delete || U+E017 || || Semicolon || U+E018 || || Equals || U+E019 || || *Key* || *Code* || || Numpad 0 || U+E01A || || Numpad 1 || U+E01B || || Numpad 2 || U+E01C || || Numpad 3 || U+E01D || || Numpad 4 || U+E01E || || Numpad 5 || U+E01F || || Numpad 6 || U+E020 || || Numpad 7 || U+E021 || || Numpad 8 || U+E022 || || Numpad 9 || U+E023 || || *Key* || *Code* || || Multiply || U+E024 || || Add || U+E025 || || Separator || U+E026 || || Subtract || U+E027 || || Decimal || U+E028 || || Divide || U+E029 || || *Key* || *Code* || || F1 || U+E031 || || F2 || U+E032 || || F3 || U+E033 || || F4 || U+E034 || || F5 || U+E035 || || F6 || U+E036 || || F7 || U+E037 || || F8 || U+E038 || || F9 || U+E039 || || F10 || U+E03A || || F11 || U+E03B || || F12 || U+E03C || || Command/Meta || U+E03D ||
^1^ The return key is _not the same_ as the \ [http://en.wikipedia.org/wiki/Enter_key enter key].
The server must process the key sequence as follows: * Each key that appears on the keyboard without requiring modifiers are sent \ as a keydown followed by a key up. * If the server does not support native events and must simulate key strokes \ with !JavaScript, it must generate keydown, keypress, and keyup events, in that\ order. The keypress event should only be fired when the corresponding key is \ for a printable character. * If a key requires a modifier key (e.g. "!" on a standard US keyboard), the \ sequence is: modifier down, key down, key up, \ modifier up, where key is the ideal unmodified key value \ (using the previous example, a "1"). * Modifier keys (Ctrl, Shift, Alt, and Command/Meta) are assumed to be \ "sticky"; each modifier should be held down (e.g. only a keydown event) until \ either the modifier is encountered again in the sequence, or the `NULL` \ (U+E000) key is encountered. * Each key sequence is terminated with an implicit `NULL` key. Subsequently, \ all depressed modifier keys must be released (with corresponding keyup events) \ at the end of the sequence. '''). RequiresVisibility(). AddJsonParameter('value', '{Array.}', 'The sequence of keys to type. An array must be provided. ' 'The server should flatten the array items to a single ' 'string to be typed.')) resources.append( SessionResource('/session/:sessionId/keys'). Post('Send a sequence of key strokes to the active element. This ' 'command is similar to the ' '[JsonWireProtocol#/session/:sessionId/element/:id/value' ' send keys] command in every aspect except the implicit ' 'termination: The modifiers are *not* released at the end of the ' 'call. Rather, the state of the modifier keys is kept between ' 'calls, so mouse interactions can be performed while modifier ' 'keys are depressed.'). AddJsonParameter('value', '{Array.}', 'The keys sequence to be sent. The sequence is defined ' 'in the' '[JsonWireProtocol#/session/:sessionId/element/:id/value' ' send keys] command.')) resources.append( ElementResource('/session/:sessionId/element/:id/name'). Get('Query for an element\'s tag name.'). SetReturnType('{string}', 'The element\'s tag name, as a lowercase string.')) resources.append( ElementResource('/session/:sessionId/element/:id/clear'). Post('Clear a `TEXTAREA` or `text INPUT` element\'s value.'). RequiresVisibility(). RequiresEnabledState()) resources.append( ElementResource('/session/:sessionId/element/:id/selected'). Get('Determine if an `OPTION` element, or an `INPUT` element of type `checkbox` or ' '`radiobutton` is currently selected.'). SetReturnType('{boolean}', 'Whether the element is selected.')) resources.append( ElementResource('/session/:sessionId/element/:id/enabled'). Get('Determine if an element is currently enabled.'). SetReturnType('{boolean}', 'Whether the element is enabled.')) resources.append( ElementResource('/session/:sessionId/element/:id/attribute/:name'). Get('Get the value of an element\'s attribute.'). SetReturnType('{string|null}', 'The value of the attribute, or null if it is not set on the element.')) resources.append( ElementResource('/session/:sessionId/element/:id/equals/:other'). Get('Test if two element IDs refer to the same DOM element.'). AddUrlParameter(':other', 'ID of the element to compare against.'). SetReturnType('{boolean}', 'Whether the two IDs refer to the same element.'). AddError('StaleElementReference', 'If either the element refered to by `:id` or `:other` is no ' 'longer attached to the page\'s DOM.')) resources.append( ElementResource('/session/:sessionId/element/:id/displayed'). Get('Determine if an element is currently displayed.'). SetReturnType('{boolean}', 'Whether the element is displayed.')) resources.append( ElementResource('/session/:sessionId/element/:id/location'). Get('Determine an element\'s location on the page. The point `(0, 0)` refers to the ' 'upper-left corner of the page. The element\'s coordinates are returned as a JSON object ' 'with `x` and `y` properties.'). SetReturnType('{x:number, y:number}', 'The X and Y coordinates for the element on the page.')) resources.append( ElementResource('/session/:sessionId/element/:id/location_in_view'). Get('''Determine an element\'s location on the screen once it has been \ scrolled into view. *Note:* This is considered an internal command and should *only* be used to \ determine an element's location for correctly generating native events.'''). SetReturnType('{x:number, y:number}', 'The X and Y coordinates for the element.')) resources.append( ElementResource('/session/:sessionId/element/:id/size'). Get('Determine an element\'s size in pixels. The size will be returned as a JSON object ' ' with `width` and `height` properties.'). SetReturnType('{width:number, height:number}', 'The width and height of the element, in pixels.')) resources.append( ElementResource('/session/:sessionId/element/:id/css/:propertyName'). Get('Query the value of an element\'s computed CSS property. The CSS property to query should' ' be specified using the CSS property name, *not* the !JavaScript property name (e.g. ' '`background-color` instead of `backgroundColor`).'). SetReturnType('{string}', 'The value of the specified CSS property.')) resources.append( SessionResource('/session/:sessionId/orientation'). Get('Get the current browser orientation. The server should return a ' 'valid orientation value as defined in [http://selenium.googlecode.' 'com/svn/trunk/docs/api/java/org/openqa/selenium/ScreenOrientation' '.html ScreenOrientation]: `{LANDSCAPE|PORTRAIT}`.'). SetReturnType('{string}', 'The current browser orientation corresponding' ' to a value defined in [http://selenium.googlecode.com/' 'svn/trunk/docs/api/java/org/openqa/selenium/' 'ScreenOrientation.html ScreenOrientation]: ' '`{LANDSCAPE|PORTRAIT}`.'). Post('Set the browser orientation. The orientation should be specified ' 'as defined in [http://selenium.googlecode.com/svn/trunk/docs/api/' 'java/org/openqa/selenium/ScreenOrientation.html ScreenOrientation]' ': `{LANDSCAPE|PORTRAIT}`.'). AddJsonParameter('orientation', '{string}', 'The new browser orientation as defined in ' '[http://selenium.googlecode.com/svn/trunk/docs/api/' 'java/org/openqa/selenium/ScreenOrientation.html ' 'ScreenOrientation]: `{LANDSCAPE|PORTRAIT}`.')) resources.append( SessionResource('/session/:sessionId/alert_text'). Get('Gets the text of the currently displayed JavaScript `alert()`, `confirm()`, ' 'or `prompt()` dialog.'). SetReturnType('{string}', 'The text of the currently displayed alert.'). AddError('NoAlertPresent', 'If there is no alert displayed.'). Post('Sends keystrokes to a JavaScript `prompt()` dialog.'). AddJsonParameter('text', '{string}', 'Keystrokes to send to the `prompt()` dialog.'). AddError('NoAlertPresent', 'If there is no alert displayed.')) resources.append( SessionResource('/session/:sessionId/accept_alert'). Post('Accepts the currently displayed alert dialog. Usually, this is equivalent ' 'to clicking on the \'OK\' button in the dialog.'). AddError('NoAlertPresent', 'If there is no alert displayed.')) resources.append( SessionResource('/session/:sessionId/dismiss_alert'). Post('Dismisses the currently displayed alert dialog. For `confirm()` and `prompt()` ' 'dialogs, this is equivalent to clicking the \'Cancel\' button. For `alert()` ' 'dialogs, this is equivalent to clicking the \'OK\' button.'). AddError('NoAlertPresent', 'If there is no alert displayed.')) resources.append( SessionResource('/session/:sessionId/moveto'). Post('Move the mouse by an offset of the specificed element. If no element ' 'is specified, the move is relative to the current mouse cursor. If an ' 'element is provided but no offset, the mouse will be moved to the center' ' of the element. If the element is not visible, it will be scrolled into view.'). AddJsonParameter('element', '{string}', 'Opaque ID assigned to the element to move to, as ' 'described in the WebElement JSON Object. If not specified' ' or is null, the offset is relative to current position of the mouse.'). AddJsonParameter('xoffset', '{number}', 'X offset to move to, relative to the top-left ' 'corner of the element. If not specified, the mouse' ' will move to the middle of the element.'). AddJsonParameter('yoffset', '{number}', 'Y offset to move to, relative to the top-left ' 'corner of the element. If not specified, the mouse' ' will move to the middle of the element.')) resources.append( SessionResource('/session/:sessionId/click'). Post('Click any mouse button (at the coordinates set by the last moveto command). Note ' 'that calling this command after calling buttondown and before calling button up ' '(or any out-of-order interactions sequence) will yield undefined behaviour).'). AddJsonParameter('button', '{number}', 'Which button, enum: `{LEFT = 0, MIDDLE = 1 ' ', RIGHT = 2}`. Defaults to the left mouse button if not specified.')) resources.append( SessionResource('/session/:sessionId/buttondown'). Post('Click and hold the left mouse button (at the coordinates set by the last moveto ' 'command). Note that the next mouse-related command that should follow is buttondown' ' . Any other mouse command (such as click or another call to buttondown) will yield' ' undefined behaviour.'). AddJsonParameter('button', '{number}', 'Which button, enum: `{LEFT = 0, MIDDLE = 1 ' ', RIGHT = 2}`. Defaults to the left mouse button if not specified.')) resources.append( SessionResource('/session/:sessionId/buttonup'). Post('Releases the mouse button previously held (where the mouse is currently at). ' 'Must be called once for every buttondown command issued. See the note in click and ' 'buttondown about implications of out-of-order commands.'). AddJsonParameter('button', '{number}', 'Which button, enum: `{LEFT = 0, MIDDLE = 1 ' ', RIGHT = 2}`. Defaults to the left mouse button if not specified.')) resources.append( SessionResource('/session/:sessionId/doubleclick'). Post('Double-clicks at the current mouse coordinates (set by moveto).')) resources.append( SessionResource('/session/:sessionId/touch/click'). Post('Single tap on the touch enabled device.'). AddJsonParameter('element', '{string}', 'ID of the element to single tap ' 'on.')) resources.append( SessionResource('/session/:sessionId/touch/down'). Post('Finger down on the screen.'). AddJsonParameter('x', '{number}', 'X coordinate on the screen.'). AddJsonParameter('y', '{number}', 'Y coordinate on the screen.')) resources.append( SessionResource('/session/:sessionId/touch/up'). Post('Finger up on the screen.'). AddJsonParameter('x', '{number}', 'X coordinate on the screen.'). AddJsonParameter('y', '{number}', 'Y coordinate on the screen.')) resources.append( SessionResource('session/:sessionId/touch/move'). Post('Finger move on the screen.'). AddJsonParameter('x', '{number}', 'X coordinate on the screen.'). AddJsonParameter('y', '{number}', 'Y coordinate on the screen.')) resources.append( SessionResource('session/:sessionId/touch/scroll'). Post('Scroll on the touch screen using finger based motion events. Use ' 'this command to start scrolling at a particular screen location.'). AddJsonParameter('element', '{string}', 'ID of the element where the ' 'scroll starts.'). AddJsonParameter('xoffset', '{number}', 'The x offset in pixels to scroll ' 'by.'). AddJsonParameter('yoffset', '{number}', 'The y offset in pixels to scroll ' 'by.')) resources.append( SessionResource('session/:sessionId/touch/scroll'). Post('Scroll on the touch screen using finger based motion events. Use ' 'this command if you don\'t care where the scroll starts on the ' 'screen.'). AddJsonParameter('xoffset', '{number}', 'The x offset in pixels to scroll' 'by.'). AddJsonParameter('yoffset', '{number}', 'The y offset in pixels to scroll' 'by.')) resources.append( SessionResource('session/:sessionId/touch/doubleclick'). Post('Double tap on the touch screen using finger motion events.'). AddJsonParameter('element', '{string}', 'ID of the element to double tap ' 'on.')) resources.append( SessionResource('session/:sessionId/touch/longclick'). Post('Long press on the touch screen using finger motion events.'). AddJsonParameter('element', '{string}', 'ID of the element to long press ' 'on.')) resources.append( SessionResource('session/:sessionId/touch/flick'). Post('Flick on the touch screen using finger motion events. This flick' 'command starts at a particulat screen location.'). AddJsonParameter('element', '{string}', 'ID of the element where the ' 'flick starts.'). AddJsonParameter('xoffset', '{number}', 'The x offset in pixels to flick ' 'by.'). AddJsonParameter('yoffset', '{number}', 'The y offset in pixels to flick ' 'by.'). AddJsonParameter('speed', '{number}', 'The speed in pixels per seconds.')) resources.append( SessionResource('session/:sessionId/touch/flick'). Post('Flick on the touch screen using finger motion events. Use this ' 'flick command if you don\'t care where the flick starts on the screen.'). AddJsonParameter('xSpeed', '{number}', 'The x speed in pixels per ' 'second.'). AddJsonParameter('ySpeed', '{number}', 'The y speed in pixels per ' 'second.')) resources.append( SessionResource('/session/:sessionId/location'). Get('Get the current geo location.'). SetReturnType('{latitude: number, longitude: number, altitude: number}', 'The current geo location.'). Post('Set the current geo location.'). AddJsonParameter('location', '{latitude: number, longitude: number, altitude: number}', 'The new location.')) resources.append( SessionResource('/session/:sessionId/local_storage'). Get('Get all keys of the storage.'). SetReturnType('{Array.}', 'The list of keys.'). Post('Set the storage item for the given key.'). AddJsonParameter('key', '{string}', 'The key to set.'). AddJsonParameter('value', '{string}', 'The value to set.'). Delete('Clear the storage.')) resources.append( SessionResource('/session/:sessionId/local_storage/key/:key'). Get('Get the storage item for the given key.'). AddUrlParameter(':key', 'The key to get.'). Delete('Remove the storage item for the given key.'). AddUrlParameter(':key', 'The key to remove.')) resources.append( SessionResource('/session/:sessionId/local_storage/size'). Get('Get the number of items in the storage.'). SetReturnType('{number}', 'The number of items in the storage.')) resources.append( SessionResource('/session/:sessionId/session_storage'). Get('Get all keys of the storage.'). SetReturnType('{Array.}', 'The list of keys.'). Post('Set the storage item for the given key.'). AddJsonParameter('key', '{string}', 'The key to set.'). AddJsonParameter('value', '{string}', 'The value to set.'). Delete('Clear the storage.')) resources.append( SessionResource('/session/:sessionId/session_storage/key/:key'). Get('Get the storage item for the given key.'). AddUrlParameter(':key', 'The key to get.'). Delete('Remove the storage item for the given key.'). AddUrlParameter(':key', 'The key to remove.')) resources.append( SessionResource('/session/:sessionId/session_storage/size'). Get('Get the number of items in the storage.'). SetReturnType('{number}', 'The number of items in the storage.')) resources.append( SessionResource('/session/:sessionId/log'). Post('Get the log for a given log type. Log buffer is reset after each request.'). AddJsonParameter('type', '{string}', 'The log type, as defined in ' '[http://selenium.googlecode.com/svn/trunk/docs/api/' 'java/org/openqa/selenium/logging/LogType.html ' 'LogType]. The log type must be provided.'). SetReturnType('{Array.}', 'The list of [#Log_Entry_JSON_Object log entries].')) logging.info('Generating %s', wiki_path) f = open(wiki_path, 'w') try: f.write('''#summary A description of the protocol used by WebDriver to \ communicate with remote instances #labels WebDriver ======================================================== ======================================================== DO NOT EDIT THIS WIKI PAGE THROUGH THE UI. Instead, use http://selenium.googlecode.com/svn/trunk/wire.py $ svn co https://selenium.googlecode.com/svn/ --depth=empty wire_protocol $ cd wire_protocol $ svn update --depth=infinity ./wiki $ svn update --depth=files ./trunk # modify ./trunk/wire.py $ python ./trunk/wire.py $ svn commit ./trunk/wire.py ./wiki/JsonWireProtocol.wiki ======================================================== ======================================================== *The !WebDriver Wire Protocol* *Status:* _DRAFT_ = Introduction = All implementations of WebDriver that communicate with the browser, or a \ RemoteWebDriver server shall use a common wire protocol. This wire protocol \ defines a [http://www.google.com?q=RESTful+web+service RESTful web service] \ using [http://www.json.org JSON] over HTTP. The protocol will assume that the WebDriver API has been "flattened", but there\ is an expectation that client implementations will take a more Object-Oriented\ approach, as demonstrated in the existing Java API. The wire protocol is\ implemented in request/response pairs of "commands" and "responses". == Basic Terms and Concepts ==
==== Client ====
The machine on which the !WebDriver API is being used.
==== Server ====
The machine running the RemoteWebDriver. This term may also refer to a \ specific browser that implements the wire protocol directly, such as the \ FirefoxDriver or IPhoneDriver.
==== Session ====
The server should maintain one browser per session. Commands sent to a \ session will be directed to the corresponding browser.
==== !WebElement ====
An object in the !WebDriver API that represents a DOM element on the page.
==== !WebElement JSON Object ====
The JSON representation of a !WebElement for transmission over the wire. \ This object will have the following properties: || *Key* || *Type* || *Description* || || ELEMENT || string || The opaque ID assigned to the element by the server. \ This ID should be used in all subsequent commands issued against the element. ||
==== Capabilities JSON Object ====
Not all server implementations will support every !WebDriver feature. \ Therefore, the client and server should use JSON objects with the properties \ listed below when describing which features a session supports. || *Key* || *Type* || *Description* || || browserName || string || The name of the browser being used; should be one \ of `{chrome|firefox|htmlunit|internet explorer|iphone}`. || || version || string || The browser version, or the empty string if unknown. || || platform || string || A key specifying which platform the browser is running \ on. This value should be one of `{WINDOWS|XP|VISTA|MAC|LINUX|UNIX}`. When \ requesting a new session, the client may specify `ANY` to indicate any \ available platform may be used. || || javascriptEnabled || boolean || Whether the session supports executing user \ supplied JavaScript in the context of the current page. || || takesScreenshot || boolean || Whether the session supports taking \ screenshots of the current page. || || handlesAlerts || boolean || Whether the session can interact with modal \ popups, such as `window.alert` and `window.confirm`. || || databaseEnabled || boolean || Whether the session can interact \ database storage. || || locationContextEnabled || boolean || Whether the session can set and query \ the browser's location context. || || applicationCacheEnabled || boolean || Whether the session can interact with \ the application cache. || || browserConnectionEnabled || boolean || Whether the session can query for \ the browser's connectivity and disable it if desired. || || cssSelectorsEnabled || boolean || Whether the session supports CSS \ selectors when searching for elements. || || webStorageEnabled || boolean || Whether the session supports interactions \ with [http://www.w3.org/TR/2009/WD-webstorage-20091029/ storage objects]. || || rotatable || boolean || Whether the session can rotate the current page's \ current layout between portrait and landscape orientations (only applies to \ mobile platforms). || || acceptSslCerts || boolean || Whether the session should accept all SSL \ certs by default. || || nativeEvents || boolean || Whether the session is capable of generating \ native events when simulating user input. || || proxy || proxy object || Details of any proxy to use. If no proxy is \ specified, whatever the system's current or default state is used. The format \ is specified under Proxy JSON Object. ||
==== Desired Capabilities ====
A Capabilities JSON Object sent by the client describing the capabilities \ a new session created by the server should possess. Any omitted keys implicitly \ indicate the corresponding capability is irrelevant.
==== Actual Capabilities ====
A Capabilities JSON Object returned by the server describing what \ features a session actually supports. Any omitted keys implicitly indicate \ the corresponding capability is not supported.
==== Cookie JSON Object ====
A JSON object describing a Cookie. || *Key* || *Type* || *Description* || || name || string || The name of the cookie. || || value || string || The cookie value. || || path || string || (Optional) The cookie path.^1^ || || domain || string || (Optional) The domain the cookie is visible to.^1^ || || secure || boolean || (Optional) Whether the cookie is a secure cookie.^1^ || || expiry || number || (Optional) When the cookie expires, specified in \ seconds since midnight, January 1, 1970 UTC.^1^ || ^1^ When returning Cookie objects, the server should only omit an optional \ field if it is incapable of providing the information.
==== Log Entry JSON Object ====
A JSON object describing a log entry. || *Key* || *Type* || *Description* || || timestamp || number || The timestamp of the entry. || || level || number || The log level of the entry. || || message || string || The log message. ||
=== Proxy JSON Object ===
A JSON object describing a Proxy configuration. || *Key* || *Type* || *Description* || || proxyType || string || (Required) The type of proxy being used. Possible \ values are: *direct* - A direct connection - no proxy in use, *manual* - \ Manual proxy settings configured, e.g. setting a proxy for HTTP, a proxy for \ FTP, etc, *pac* - Proxy autoconfiguration from a URL), autodetect (proxy \ autodetection, probably with WPAD, *system* - Use system settings || || proxyAutoconfigUrl || string || (Required if proxyType == pac, Ignored \ otherwise) Specifies the URL to be used for proxy autoconfiguration. \ Expected format example: http://hostname.com:1234/pacfile || || ftpProxy, httpProxy, sslProxy || string || (Optional, Ignored if proxyType \ != manual) Specifies the proxies to be used for FTP, HTTP and HTTPS requests \ respectively. Behaviour is undefined if a request is made, where the proxy \ for the particular protocol is undefined, if proxyType is manual. Expected \ format example: hostname.com:1234 ||
= Messages = == Commands == !WebDriver command messages should conform to the [http://www.w3.org/Protocols/\ rfc2616/rfc2616-sec5.html#sec5 HTTP/1.1 request specification]. Although the \ server may be extended to respond to other content-types, the wire protocol \ dictates that all commands accept a content-type of \ `application/json;charset=UTF-8`. Likewise, the message bodies for POST and PUT\ request must use an `application/json;charset=UTF-8` content-type. Each command in the WebDriver service will be mapped to an HTTP method at a \ specific path. Path segments prefixed with a colon (:) indicate that segment \ is a variable used to further identify the underlying resource. For example, \ consider an arbitrary resource mapped as: {{{ GET /favorite/color/:name }}} Given this mapping, the server should respond to GET requests sent to \ "/favorite/color/Jack" and "/favorite/color/Jill", with the variable `:name` \ set to "Jack" and "Jill", respectively. == Responses == Command responses shall be sent as \ [http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6 HTTP/1.1 response \ messages]. If the remote server must return a 4xx response, the response body \ shall have a Content-Type of text/plain and the message body shall be a \ descriptive message of the bad request. For all other cases, if a response \ includes a message body, it must have a Content-Type of \ application/json;charset=UTF-8 and will be a JSON object with the following \ properties: || *Key* || *Type* || *Description* || || sessionId || string|null || An opaque handle used by the server to \ determine where to route session-specific commands. This ID should be included \ in all future session-commands in place of the :sessionId path segment \ variable. || || status || number || A status code summarizing the result of the command. \ A non-zero value indicates that the command failed. || || value || `*` || The response JSON value. || === Response Status Codes === The wire protocol will inherit its status codes from those used by the \ InternetExplorerDriver: || *Code* || *Summary* || *Detail* || %s The client should interpret a 404 Not Found response from the server as an \ "Unknown command" response. All other 4xx and 5xx responses from the server \ that do not define a status field should be interpreted as "Unknown error" \ responses. == Error Handling == There are two levels of error handling specified by the wire protocol: invalid \ requests and failed commands. === Invalid Requests === All invalid requests should result in the server returning a 4xx HTTP \ response. The response Content-Type should be set to text/plain and the \ message body should be a descriptive error message. The categories of invalid \ requests are as follows:
*Unknown Commands*
If the server receives a command request whose path is not mapped to a \ resource in the REST service, it should respond with a `404 Not Found` message.
*Unimplemented Commands*
Every server implementing the WebDriver wire protocol must respond to \ every defined command. If an individual command has not been implemented on \ the server, the server should respond with a `501 Not Implemented` error \ message. Note this is the only error in the Invalid Request category that does \ not return a `4xx` status code.
*Variable Resource Not Found*
If a request path maps to a variable resource, but that resource does not \ exist, then the server should respond with a `404 Not Found`. For example, if \ ID `my-session` is not a valid session ID on the server, and a command is sent \ to `GET /session/my-session HTTP/1.1`, then the server should gracefully \ return a `404`.
*Invalid Command Method*
If a request path maps to a valid resource, but that resource does not \ respond to the request method, the server should respond with a `405 Method \ Not Allowed`. The response must include an Allows header with a list of the \ allowed methods for the requested resource.
*Missing Command Parameters*
If a POST/PUT command maps to a resource that expects a set of JSON \ parameters, and the response body does not include one of those parameters, \ the server should respond with a `400 Bad Request`. The response body should \ list the missing parameters.
=== Failed Commands === If a request maps to a valid command and contains all of the expected \ parameters in the request body, yet fails to execute successfully, then the \ server should send a 500 Internal Server Error. This response should have a \ Content-Type of `application/json;charset=UTF-8` and the response body should \ be a well formed JSON response object. The response status should be one of the defined status codes and the response \ value should be another JSON object with detailed information for the failing \ command: || Key || Type || Description || || message || string || A descriptive message for the command failure. || || screen || string || (Optional) If included, a screenshot of the current \ page as a base64 encoded string. || || class || string || (Optional) If included, specifies the fully qualified \ class name for the exception that was thrown when the command failed. || || stackTrace || array || (Optional) If included, specifies an array of JSON \ objects describing the stack trace for the exception that was thrown when the \ command failed. The zeroeth element of the array represents the top of the \ stack. || Each JSON object in the stackTrace array must contain the following properties: || *Key* || *Type* || *Description* || || fileName || string || The name of the source file containing the line \ represented by this frame. || || className || string || The fully qualified class name for the class active \ in this frame. If the class name cannot be determined, or is not applicable \ for the language the server is implemented in, then this property should be \ set to the empty string. || || methodName || string || The name of the method active in this frame, or \ the empty string if unknown/not applicable. || || lineNumber || number || The line number in the original source file for the \ frame, or 0 if unknown. || = Resource Mapping = Resources in the WebDriver REST service are mapped to individual URL patterns. \ Each resource may respond to one or more HTTP request methods. If a resource \ responds to a GET request, then it should also respond to HEAD requests. All \ resources should respond to OPTIONS requests with an `Allow` header field, \ whose value is a list of all methods that resource responds to. If a resource is mapped to a URL containing a variable path segment name, that \ path segment should be used to further route the request. Variable path \ segments are indicated in the resource mapping by a colon-prefix. For example, \ consider the following: {{{ /favorite/color/:person }}} A resource mapped to this URL should parse the value of the `:person` path \ segment to further determine how to respond to the request. If this resource \ received a request for `/favorite/color/Jack`, then it should return Jack's \ favorite color. Likewise, the server should return Jill's favorite color for \ any requests to `/favorite/color/Jill`. Two resources may only be mapped to the same URL pattern if one of those \ resources' patterns contains variable path segments, and the other does not. In\ these cases, the server should always route requests to the resource whose \ path is the best match for the request. Consider the following two resource \ paths: # `/session/:sessionId/element/active` # `/session/:sessionId/element/:id` Given these mappings, the server should always route requests whose final path \ segment is active to the first resource. All other requests should be routed to\ second. = Command Reference = == Command Summary == || *HTTP Method* || *Path* || *Summary* || %s == Command Detail == %s''' % ('\n'.join(e.ToWikiTableString() for e in error_codes), ''.join(r.ToWikiTableString() for r in resources), '\n----\n\n'.join(r.ToWikiString() for r in resources))) finally: f.close() logging.info('ALL DONE!') if __name__ == '__main__': main() selenium-2.25.0/selenium.egg-info/dependency_links.txt000755 000765 000120 00000000001 12001624403 024263 0ustar00davidburnsadmin000000 000000 selenium-2.25.0/selenium.egg-info/not-zip-safe000755 000765 000120 00000000002 11771103563 022460 0ustar00davidburnsadmin000000 000000 selenium-2.25.0/selenium.egg-info/PKG-INFO000755 000765 000120 00000005453 12001624403 021321 0ustar00davidburnsadmin000000 000000 Metadata-Version: 1.0 Name: selenium Version: 2.25.0 Summary: Python bindings for Selenium Home-page: http://code.google.com/p/selenium/ Author: UNKNOWN Author-email: UNKNOWN License: UNKNOWN Description: ============ Introduction ============ :Author: David Burns Selenium Python Client Driver is a Python language binding for Selenium Remote Control (version 1.0 and 2.0). Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are supported, as well as the Selenium 1.0 bindings. As work will progresses we'll add more "native" drivers. See here_ for more information. .. _here: http://code.google.com/p/selenium/ Installing ========== Python Client ------------- :: pip install -U selenium Java Server ----------- Download the server from http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar :: java -jar selenium-server-standalone-2.25.0.jar Example ======= :: from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys import time browser = webdriver.Firefox() # Get local session of firefox browser.get("http://www.yahoo.com") # Load page assert "Yahoo!" in browser.title elem = browser.find_element_by_name("p") # Find the query box elem.send_keys("seleniumhq" + Keys.RETURN) time.sleep(0.2) # Let the page load, will be added to the API try: browser.find_element_by_xpath("//a[contains(@href,'http://seleniumhq.org')]") except NoSuchElementException: assert 0, "can't find seleniumhq" browser.close() Documentation ============= `Auto Generated API `_ Use The Source Luke! ==================== http://code.google.com/p/selenium/source/browse/trunk/py/selenium/webdriver/remote/webdriver.py Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: MacOS :: MacOS X Classifier: Topic :: Software Development :: Testing Classifier: Topic :: Software Development :: Libraries Classifier: Programming Language :: Python selenium-2.25.0/selenium.egg-info/SOURCES.txt000755 000765 000120 00000004264 12001624431 022110 0ustar00davidburnsadmin000000 000000 .git-fixfiles .gitignore .svn-authors COPYING CREDITS.txt MANIFEST.in README.md Rakefile WebDriver.sln WebDriver.snk go go.bat properties.yml selenium.eml selenium.iml setup.py wire.py py/CHANGES py/README py/selenium/__init__.py py/selenium/selenium.py py/selenium/common/__init__.py py/selenium/common/exceptions.py py/selenium/webdriver/__init__.py py/selenium/webdriver/chrome/__init__.py py/selenium/webdriver/chrome/options.py py/selenium/webdriver/chrome/service.py py/selenium/webdriver/chrome/webdriver.py py/selenium/webdriver/common/__init__.py py/selenium/webdriver/common/action_chains.py py/selenium/webdriver/common/alert.py py/selenium/webdriver/common/by.py py/selenium/webdriver/common/desired_capabilities.py py/selenium/webdriver/common/keys.py py/selenium/webdriver/common/proxy.py py/selenium/webdriver/common/utils.py py/selenium/webdriver/firefox/__init__.py py/selenium/webdriver/firefox/extension_connection.py py/selenium/webdriver/firefox/firefox_binary.py py/selenium/webdriver/firefox/firefox_profile.py py/selenium/webdriver/firefox/webdriver.py py/selenium/webdriver/firefox/webdriver.xpi py/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so py/selenium/webdriver/firefox/x86/x_ignore_nofocus.so py/selenium/webdriver/ie/__init__.py py/selenium/webdriver/ie/service.py py/selenium/webdriver/ie/webdriver.py py/selenium/webdriver/opera/__init__.py py/selenium/webdriver/opera/service.py py/selenium/webdriver/opera/webdriver.py py/selenium/webdriver/remote/__init__.py py/selenium/webdriver/remote/command.py py/selenium/webdriver/remote/errorhandler.py py/selenium/webdriver/remote/remote_connection.py py/selenium/webdriver/remote/utils.py py/selenium/webdriver/remote/webdriver.py py/selenium/webdriver/remote/webelement.py py/selenium/webdriver/support/__init__.py py/selenium/webdriver/support/abstract_event_listener.py py/selenium/webdriver/support/event_firing_webdriver.py py/selenium/webdriver/support/events.py py/selenium/webdriver/support/select.py py/selenium/webdriver/support/ui.py py/selenium/webdriver/support/wait.py selenium.egg-info/PKG-INFO selenium.egg-info/SOURCES.txt selenium.egg-info/dependency_links.txt selenium.egg-info/not-zip-safe selenium.egg-info/top_level.txtselenium-2.25.0/selenium.egg-info/top_level.txt000755 000765 000120 00000000011 12001624403 022737 0ustar00davidburnsadmin000000 000000 selenium selenium-2.25.0/py/CHANGES000644 000765 000120 00000010640 12001617052 016325 0ustar00davidburnsadmin000000 000000 Selenium 2.25 * Jython 2.7 Support - Bug 3988 * EventFiringWebDriver added to Support module - Bug 2267 * Added IEDriverServer logging that can be accessed via desired capabilities * Fixed by data being passed into find_elements - bug 3735 * Removed deprecated ChromeDriver items around desiredcapabilites in favour of chrome options * Added default values for a number of action_chains calls Selenium 2.24 * Removing the ctypes approach of invoking IEDriver, you will need to download the IEDriverServer from https://code.google.com/p/selenium/downloads/list Selenium 2.23 * Support for FF13 native events Selenium 2.22 * Moving IEDriver to be able to use IEDriverServer Selenium 2.21.3 * Fix for File Upload to remote servers * Better handling of typing in input=file. Bug 3831, 3736 * Better handling of unicode URLS Bug 3740 Selenium 2.21.2 * Fix typing to file input when not using Selenium Server. Bug 3736 Selenium 2.21.1 * focusmanager.testmode messes with native events, removing it. Selenium 2.21 * Local File upload capabilities for non-remote browser * Adding maximize_window api call * Updating default firefox profile to set focusmanager.testmode to true see https://bugzilla.mozilla.org/show_bug.cgi?id=704583 * bugs fixed: 3506, 3528, 3607 Selenium 2.20 * disable native events for FF on Mac by default * fix webdriverwait to execute at least once when using 0 timeout * Fixed Issue 3438 Selenium 2.19 * WebDriverBackedSelenium is now avalaible to all languages * Addon installation fixes Selenium 2.18 * Proxy capabilities passing Selenium 2.17 * OperaDriver can now be invoked by webdriver.Opera() * Support has been added for ChomeOptions. This deprecates support passing in DesiredCapabilities * Proxy class to tell the browser a proxy is in use. Currently only for Firefox Selenium 2.16 * bug fixes Selenium 2.15 * bug fixes Selenium 2.14 * Fix for LD_PRELOAD being polluted by WebDriver * Added Orientation API * A fix for Error Handling Selenium 2.13 * Fixed switch_to_window so that it didnt crash Firefox Bug 2633 * Fixed Screenshot handling to work in all browsers. Bug 2829 * Force Firefox to the Foreground Selenium 2.12 * Added Select as a support pacakge * Added Beta window size / position api's * Bug Fixes Selenium 2.11.0 2.11.1 * no changes just packaging Selenum 2.10 * "Choose which apps" dialog has been disabled * Bug Fixes Selenium 2.9 * Bug Fixes * Documentation Selenium 2.8 * Actions updates * Bug Fixes Selenium 2.6 * Documentation fixes Selenium 2.5 * Fixed x64 IE Support * Bug Fixes Selenium 2.4 * Bug Fixes * x64 IE Support * Added WebDriverWait as a support package Selenium 2.3 * Bug Fixes Selenium 2.2 * Ability to get screenshots from Exceptions if they are given * Access to Remote StackTrace on error Selenium 2.1 * Bug Fixes Selenium 2 * Removed toggle() and select() Selenium 2 RC 3 * Added Opera to Desired Capabilities * Removed deprecrated methods * Deprecated toggle() and select() methods. This will be removed in the next release Selenium 2 Beta 4 * Fix for using existing Firefox Profiles * Alerts Support in IE * Fix to dictionary returned from size * Deprecated value property. Use the get_attribute("value") method * Deprecated get_page_source method. Use page_source property * Deprecated get_current_window_handle. Use current_window_handle property * Deprecated get_window_handles. Use window_handles property * Ability to install extensions into profiles * Added Location to the WebElement * ChromeDriver rewritten to use new built in mechanism * Added Advanced User Interaction API. Only Available for HTMLUnit at the moment * Profiles now delete their temp folders when driver.quit() is called Selenium 2 Beta 3 * Accept Untrusted Certificates in Firefox * Fixed Screenshots * Added DesiredCapabilities to simplify choosing Drivers * Fixed Firefox Profile creation * Added Firefox 4 support * DocStrings Improvements Selenium 2 Beta 2 * New bindings landed. Change webdriver namespace to "selenium.webdriver" * Ability to move to default content * Implicit Waits * Change the API to use properties instead of get_x * Changed the Element Finding to match other languages * Added ability to execute asynchronous scripts from the driver * Ability to get rendered element size * Ability to get CSS Value on a webelement * Corrected Element finding from the element * Alert and Prompt handling * Improved IEDriver * Basic Authentication support for Selenium 2 * Ability to have multiple Firefox instances selenium-2.25.0/py/README000644 000765 000120 00000003205 12001615632 016213 0ustar00davidburnsadmin000000 000000 ============ Introduction ============ :Author: David Burns Selenium Python Client Driver is a Python language binding for Selenium Remote Control (version 1.0 and 2.0). Currently the remote protocol, Firefox and Chrome for Selenium 2.0 are supported, as well as the Selenium 1.0 bindings. As work will progresses we'll add more "native" drivers. See here_ for more information. .. _here: http://code.google.com/p/selenium/ Installing ========== Python Client ------------- :: pip install -U selenium Java Server ----------- Download the server from http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar :: java -jar selenium-server-standalone-2.25.0.jar Example ======= :: from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys import time browser = webdriver.Firefox() # Get local session of firefox browser.get("http://www.yahoo.com") # Load page assert "Yahoo!" in browser.title elem = browser.find_element_by_name("p") # Find the query box elem.send_keys("seleniumhq" + Keys.RETURN) time.sleep(0.2) # Let the page load, will be added to the API try: browser.find_element_by_xpath("//a[contains(@href,'http://seleniumhq.org')]") except NoSuchElementException: assert 0, "can't find seleniumhq" browser.close() Documentation ============= `Auto Generated API `_ Use The Source Luke! ==================== http://code.google.com/p/selenium/source/browse/trunk/py/selenium/webdriver/remote/webdriver.py selenium-2.25.0/py/selenium/000755 000765 000120 00000000000 12001624431 017151 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/__init__.py000644 000765 000120 00000001272 12001615651 021270 0ustar00davidburnsadmin000000 000000 # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from selenium import selenium __version__ = "2.25.0" selenium-2.25.0/py/selenium/common/000755 000765 000120 00000000000 12001624431 020441 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/selenium.py000644 000765 000120 00000235206 11754416741 021375 0ustar00davidburnsadmin000000 000000 """ Copyright 2011 Software Freedom Conservancy. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ __docformat__ = "restructuredtext en" import httplib import urllib class selenium(object): """ Defines an object that runs Selenium commands. **Element Locators** Element Locators tell Selenium which HTML element a command refers to. The format of a locator is: \ *locatorType*\ **=**\ \ *argument* We support the following strategies for locating elements: * \ **identifier**\ =\ *id*: Select the element with the specified @id attribute. If no match is found, select the first element whose @name attribute is \ *id*. (This is normally the default; see below.) * \ **id**\ =\ *id*: Select the element with the specified @id attribute. * \ **name**\ =\ *name*: Select the first element with the specified @name attribute. * username * name=username The name may optionally be followed by one or more \ *element-filters*, separated from the name by whitespace. If the \ *filterType* is not specified, \ **value**\ is assumed. * name=flavour value=chocolate * \ **dom**\ =\ *javascriptExpression*: Find an element by evaluating the specified string. This allows you to traverse the HTML Document Object Model using JavaScript. Note that you must not return a value in this string; simply make it the last expression in the block. * dom=document.forms['myForm'].myDropdown * dom=document.images[56] * dom=function foo() { return document.links[1]; }; foo(); * \ **xpath**\ =\ *xpathExpression*: Locate an element using an XPath expression. * xpath=//img[@alt='The image alt text'] * xpath=//table[@id='table1']//tr[4]/td[2] * xpath=//a[contains(@href,'#id1')] * xpath=//a[contains(@href,'#id1')]/@class * xpath=(//table[@class='stylee'])//th[text()='theHeaderText']/../td * xpath=//input[@name='name2' and @value='yes'] * xpath=//\*[text()="right"] * \ **link**\ =\ *textPattern*: Select the link (anchor) element which contains text matching the specified \ *pattern*. * link=The link text * \ **css**\ =\ *cssSelectorSyntax*: Select the element using css selectors. Please refer to CSS2 selectors, CSS3 selectors 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. * css=a[href="#id3"] * css=span#firstChild + span 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). * \ **ui**\ =\ *uiSpecifierString*: Locate an element by resolving the UI specifier string to another locator, and evaluating it. See the Selenium UI-Element Reference for more details. * ui=loginPages::loginButton() * ui=settingsPages::toggle(label=Hide Email) * ui=forumPages::postBody(index=2)//a[2] Without an explicit locator prefix, Selenium uses the following default strategies: * \ **dom**\ , for locators starting with "document." * \ **xpath**\ , for locators starting with "//" * \ **identifier**\ , otherwise **Element Filters** 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. Filters look much like locators, ie. \ *filterType*\ **=**\ \ *argument* Supported element-filters are: \ **value=**\ \ *valuePattern* Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons. \ **index=**\ \ *index* Selects a single element based on its position in the list (offset from zero). **String-match Patterns** Various Pattern syntaxes are available for matching string values: * \ **glob:**\ \ *pattern*: Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a kind of limited regular-expression syntax typically used in command-line shells. In a glob pattern, "\*" represents any sequence of characters, and "?" represents any single character. Glob patterns match against the entire string. * \ **regexp:**\ \ *regexp*: Match a string using a regular-expression. The full power of JavaScript regular-expressions is available. * \ **regexpi:**\ \ *regexpi*: Match a string using a case-insensitive regular-expression. * \ **exact:**\ \ *string*: Match a string exactly, verbatim, without any of that fancy wildcard stuff. If no pattern prefix is specified, Selenium assumes that it's a "glob" pattern. For commands that return multiple values (such as verifySelectOptions), the string being matched is a comma-separated list of the return values, where both commas and backslashes in the values are backslash-escaped. When providing a pattern, the optional matching syntax (i.e. glob, regexp, etc.) is specified once, as usual, at the beginning of the pattern. """ ### This part is hard-coded in the XSL def __init__(self, host, port, browserStartCommand, browserURL): self.host = host self.port = port self.browserStartCommand = browserStartCommand self.browserURL = browserURL self.sessionId = None self.extensionJs = "" def setExtensionJs(self, extensionJs): self.extensionJs = extensionJs def start(self, browserConfigurationOptions=None, driver=None): start_args = [self.browserStartCommand, self.browserURL, self.extensionJs] if browserConfigurationOptions: start_args.append(browserConfigurationOptions) if driver: id = driver.desired_capabilities['webdriver.remote.sessionid'] start_args.append('webdriver.remote.sessionid=%s' % id) result = self.get_string("getNewBrowserSession", start_args) try: self.sessionId = result except ValueError: raise Exception, result def stop(self): self.do_command("testComplete", []) self.sessionId = None def do_command(self, verb, args): conn = httplib.HTTPConnection(self.host, self.port) try: body = u'cmd=' + urllib.quote_plus(unicode(verb).encode('utf-8')) for i in range(len(args)): body += '&' + unicode(i+1) + '=' + \ urllib.quote_plus(unicode(args[i]).encode('utf-8')) if (None != self.sessionId): body += "&sessionId=" + unicode(self.sessionId) headers = { "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" } conn.request("POST", "/selenium-server/driver/", body, headers) response = conn.getresponse() data = unicode(response.read(), "UTF-8") if (not data.startswith('OK')): raise Exception, data return data finally: conn.close() def get_string(self, verb, args): result = self.do_command(verb, args) return result[3:] def get_string_array(self, verb, args): csv = self.get_string(verb, args) if not csv: return [] token = "" tokens = [] escape = False for i in range(len(csv)): letter = csv[i] if (escape): token = token + letter escape = False continue if (letter == '\\'): escape = True elif (letter == ','): tokens.append(token) token = "" else: token = token + letter tokens.append(token) return tokens def get_number(self, verb, args): return int(self.get_string(verb, args)) def get_number_array(self, verb, args): string_array = self.get_string_array(verb, args) num_array = [] for i in string_array: num_array.append(int(i)) return num_array def get_boolean(self, verb, args): boolstr = self.get_string(verb, args) if ("true" == boolstr): return True if ("false" == boolstr): return False raise ValueError, "result is neither 'true' nor 'false': " + boolstr def get_boolean_array(self, verb, args): boolarr = self.get_string_array(verb, args) for i, boolstr in enumerate(boolarr): if ("true" == boolstr): boolarr[i] = True continue if ("false" == boolstr): boolarr[i] = False continue raise ValueError, "result is neither 'true' nor 'false': " + boolarr[i] return boolarr def click(self,locator): """ Clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad. 'locator' is an element locator """ self.do_command("click", [locator,]) def double_click(self,locator): """ Double clicks on a link, button, checkbox or radio button. If the double click action causes a new page to load (like a link usually does), call waitForPageToLoad. 'locator' is an element locator """ self.do_command("doubleClick", [locator,]) def context_menu(self,locator): """ Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element). 'locator' is an element locator """ self.do_command("contextMenu", [locator,]) def click_at(self,locator,coordString): """ Clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad. 'locator' is an element locator 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. """ self.do_command("clickAt", [locator,coordString,]) def double_click_at(self,locator,coordString): """ Doubleclicks on a link, button, checkbox or radio button. If the action causes a new page to load (like a link usually does), call waitForPageToLoad. 'locator' is an element locator 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. """ self.do_command("doubleClickAt", [locator,coordString,]) def context_menu_at(self,locator,coordString): """ Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element). 'locator' is an element locator 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. """ self.do_command("contextMenuAt", [locator,coordString,]) def fire_event(self,locator,eventName): """ Explicitly simulate an event, to trigger the corresponding "on\ *event*" handler. 'locator' is an element locator 'eventName' is the event name, e.g. "focus" or "blur" """ self.do_command("fireEvent", [locator,eventName,]) def focus(self,locator): """ Move the focus to the specified element; for example, if the element is an input field, move the cursor to that field. 'locator' is an element locator """ self.do_command("focus", [locator,]) def key_press(self,locator,keySequence): """ Simulates a user pressing and releasing a key. 'locator' is an element locator 'keySequence' is 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". """ self.do_command("keyPress", [locator,keySequence,]) def shift_key_down(self): """ Press the shift key and hold it down until doShiftUp() is called or a new page is loaded. """ self.do_command("shiftKeyDown", []) def shift_key_up(self): """ Release the shift key. """ self.do_command("shiftKeyUp", []) def meta_key_down(self): """ Press the meta key and hold it down until doMetaUp() is called or a new page is loaded. """ self.do_command("metaKeyDown", []) def meta_key_up(self): """ Release the meta key. """ self.do_command("metaKeyUp", []) def alt_key_down(self): """ Press the alt key and hold it down until doAltUp() is called or a new page is loaded. """ self.do_command("altKeyDown", []) def alt_key_up(self): """ Release the alt key. """ self.do_command("altKeyUp", []) def control_key_down(self): """ Press the control key and hold it down until doControlUp() is called or a new page is loaded. """ self.do_command("controlKeyDown", []) def control_key_up(self): """ Release the control key. """ self.do_command("controlKeyUp", []) def key_down(self,locator,keySequence): """ Simulates a user pressing a key (without releasing it yet). 'locator' is an element locator 'keySequence' is 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". """ self.do_command("keyDown", [locator,keySequence,]) def key_up(self,locator,keySequence): """ Simulates a user releasing a key. 'locator' is an element locator 'keySequence' is 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". """ self.do_command("keyUp", [locator,keySequence,]) def mouse_over(self,locator): """ Simulates a user hovering a mouse over the specified element. 'locator' is an element locator """ self.do_command("mouseOver", [locator,]) def mouse_out(self,locator): """ Simulates a user moving the mouse pointer away from the specified element. 'locator' is an element locator """ self.do_command("mouseOut", [locator,]) def mouse_down(self,locator): """ Simulates a user pressing the left mouse button (without releasing it yet) on the specified element. 'locator' is an element locator """ self.do_command("mouseDown", [locator,]) def mouse_down_right(self,locator): """ Simulates a user pressing the right mouse button (without releasing it yet) on the specified element. 'locator' is an element locator """ self.do_command("mouseDownRight", [locator,]) def mouse_down_at(self,locator,coordString): """ Simulates a user pressing the left mouse button (without releasing it yet) at the specified location. 'locator' is an element locator 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. """ self.do_command("mouseDownAt", [locator,coordString,]) def mouse_down_right_at(self,locator,coordString): """ Simulates a user pressing the right mouse button (without releasing it yet) at the specified location. 'locator' is an element locator 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. """ self.do_command("mouseDownRightAt", [locator,coordString,]) def mouse_up(self,locator): """ Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) on the specified element. 'locator' is an element locator """ self.do_command("mouseUp", [locator,]) def mouse_up_right(self,locator): """ Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) on the specified element. 'locator' is an element locator """ self.do_command("mouseUpRight", [locator,]) def mouse_up_at(self,locator,coordString): """ Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) at the specified location. 'locator' is an element locator 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. """ self.do_command("mouseUpAt", [locator,coordString,]) def mouse_up_right_at(self,locator,coordString): """ Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) at the specified location. 'locator' is an element locator 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. """ self.do_command("mouseUpRightAt", [locator,coordString,]) def mouse_move(self,locator): """ Simulates a user pressing the mouse button (without releasing it yet) on the specified element. 'locator' is an element locator """ self.do_command("mouseMove", [locator,]) def mouse_move_at(self,locator,coordString): """ Simulates a user pressing the mouse button (without releasing it yet) on the specified element. 'locator' is an element locator 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. """ self.do_command("mouseMoveAt", [locator,coordString,]) def type(self,locator,value): """ Sets the value of an input field, as though you typed it in. Can also be used to set the value of combo boxes, check boxes, etc. In these cases, value should be the value of the option selected, not the visible text. 'locator' is an element locator 'value' is the value to type """ self.do_command("type", [locator,value,]) def type_keys(self,locator,value): """ Simulates keystroke events on the specified element, as though you typed the value key-by-key. This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string; this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events. Unlike the simple "type" command, which forces the specified value into the page directly, this command may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in the field. 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 send the keystroke events corresponding to what you just typed. 'locator' is an element locator 'value' is the value to type """ self.do_command("typeKeys", [locator,value,]) def set_speed(self,value): """ 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., the delay is 0 milliseconds. 'value' is the number of milliseconds to pause after operation """ self.do_command("setSpeed", [value,]) def get_speed(self): """ 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., the delay is 0 milliseconds. See also setSpeed. """ return self.get_string("getSpeed", []) def get_log(self): """ Get RC logs associated with current session. """ return self.get_string("getLog", []) def check(self,locator): """ Check a toggle-button (checkbox/radio) 'locator' is an element locator """ self.do_command("check", [locator,]) def uncheck(self,locator): """ Uncheck a toggle-button (checkbox/radio) 'locator' is an element locator """ self.do_command("uncheck", [locator,]) def select(self,selectLocator,optionLocator): """ Select an option from a drop-down using an option locator. Option locators provide different ways of specifying options of an HTML Select element (e.g. for selecting a specific option, or for asserting that the selected option satisfies a specification). There are several forms of Select Option Locator. * \ **label**\ =\ *labelPattern*: matches options based on their labels, i.e. the visible text. (This is the default.) * label=regexp:^[Oo]ther * \ **value**\ =\ *valuePattern*: matches options based on their values. * value=other * \ **id**\ =\ *id*: matches options based on their ids. * id=option1 * \ **index**\ =\ *index*: matches an option based on its index (offset from zero). * index=2 If no option locator prefix is provided, the default behaviour is to match on \ **label**\ . 'selectLocator' is an element locator identifying a drop-down menu 'optionLocator' is an option locator (a label by default) """ self.do_command("select", [selectLocator,optionLocator,]) def add_selection(self,locator,optionLocator): """ Add a selection to the set of selected options in a multi-select element using an option locator. @see #doSelect for details of option locators 'locator' is an element locator identifying a multi-select box 'optionLocator' is an option locator (a label by default) """ self.do_command("addSelection", [locator,optionLocator,]) def remove_selection(self,locator,optionLocator): """ Remove a selection from the set of selected options in a multi-select element using an option locator. @see #doSelect for details of option locators 'locator' is an element locator identifying a multi-select box 'optionLocator' is an option locator (a label by default) """ self.do_command("removeSelection", [locator,optionLocator,]) def remove_all_selections(self,locator): """ Unselects all of the selected options in a multi-select element. 'locator' is an element locator identifying a multi-select box """ self.do_command("removeAllSelections", [locator,]) def submit(self,formLocator): """ Submit the specified form. This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms. 'formLocator' is an element locator for the form you want to submit """ self.do_command("submit", [formLocator,]) def open(self,url,ignoreResponseCode=True): """ Opens an URL in the test frame. This accepts both relative and absolute URLs. The "open" command waits for the page to load before proceeding, ie. the "AndWait" suffix is implicit. \ *Note*: The URL must be on the same domain as the runner HTML due to security restrictions in the browser (Same Origin Policy). If you need to open an URL on another domain, use the Selenium Server to start a new browser session on that domain. 'url' is the URL to open; may be relative or absolute 'ignoreResponseCode' if set to true: doesnt send ajax HEAD/GET request; if set to false: sends ajax HEAD/GET request to the url and reports error code if any as response to open. """ self.do_command("open", [url,ignoreResponseCode]) def open_window(self,url,windowID): """ Opens a popup window (if a window with that ID isn't already open). After opening the window, you'll need to select it using the selectWindow command. 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). In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow"). 'url' is the URL to open, which can be blank 'windowID' is the JavaScript window ID of the window to select """ self.do_command("openWindow", [url,windowID,]) def select_window(self,windowID): """ Selects a popup window using a window locator; once a popup window has been selected, all commands go to that window. To select the main window again, use null as the target. Window locators provide different ways of specifying the window object: by title, by internal JavaScript "name," or by JavaScript variable. * \ **title**\ =\ *My Special Window*: Finds the window using the text that appears in the title bar. Be careful; two windows can share the same title. If that happens, this locator will just pick one. * \ **name**\ =\ *myWindow*: Finds the window using its internal JavaScript "name" property. This is the second parameter "windowName" passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag) (which Selenium intercepts). * \ **var**\ =\ *variableName*: Some pop-up windows are unnamed (anonymous), but are associated with a JavaScript variable name in the current application window, e.g. "window.foo = window.open(url);". In those cases, you can open the window using "var=foo". If no window locator prefix is provided, we'll try to guess what you mean like this: 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). 2.) if the value of the "windowID" parameter is a JavaScript variable name in the current application window, then it is assumed that this variable contains the return value from a call to the JavaScript window.open() method. 3.) Otherwise, selenium looks in a hash it maintains that maps string names to window "names". 4.) If \ *that* fails, we'll try looping over all of the known windows to try to find the appropriate "title". Since "title" is not necessarily unique, this may have unexpected behavior. If you're having trouble figuring out the name of a window that you want to manipulate, look at the Selenium log messages which identify the names of windows created via window.open (and therefore intercepted by Selenium). You will see messages like the following for each window as it is opened: ``debug: window.open call intercepted; window ID (which you can use with selectWindow()) is "myNewWindow"`` 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). (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 an empty (blank) url, like this: openWindow("", "myFunnyWindow"). 'windowID' is the JavaScript window ID of the window to select """ self.do_command("selectWindow", [windowID,]) def select_pop_up(self,windowID): """ Simplifies the process of selecting a popup window (and does not offer functionality beyond what ``selectWindow()`` already provides). * If ``windowID`` is either not specified, or specified as "null", the first non-top window is selected. The top window is the one that would be selected by ``selectWindow()`` without providing a ``windowID`` . This should not be used when more than one popup window is in play. * Otherwise, the window will be looked up considering ``windowID`` as the following in order: 1) the "name" of the window, as specified to ``window.open()``; 2) a javascript variable which is a reference to a window; and 3) the title of the window. This is the same ordered lookup performed by ``selectWindow`` . 'windowID' is an identifier for the popup window, which can take on a number of different meanings """ self.do_command("selectPopUp", [windowID,]) def deselect_pop_up(self): """ Selects the main window. Functionally equivalent to using ``selectWindow()`` and specifying no value for ``windowID``. """ self.do_command("deselectPopUp", []) def select_frame(self,locator): """ Selects a frame within the current window. (You may invoke this command multiple times to select nested frames.) To select the parent frame, use "relative=parent" as a locator; to select the top frame, use "relative=top". You can also select a frame by its 0-based index number; select the first frame with "index=0", or the third frame with "index=2". You may also use a DOM expression to identify the frame you want directly, like this: ``dom=frames["main"].frames["subframe"]`` 'locator' is an element locator identifying a frame or iframe """ self.do_command("selectFrame", [locator,]) def get_whether_this_frame_match_frame_expression(self,currentFrameString,target): """ Determine whether current/locator identify the frame containing this running code. This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" frame. In this case, when the test calls selectFrame, this routine is called for each frame to figure out which one has been selected. The selected frame will return true, while all others will return false. 'currentFrameString' is starting frame 'target' is new frame (which might be relative to the current one) """ return self.get_boolean("getWhetherThisFrameMatchFrameExpression", [currentFrameString,target,]) def get_whether_this_window_match_window_expression(self,currentWindowString,target): """ Determine whether currentWindowString plus target identify the window containing this running code. This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" window. In this case, when the test calls selectWindow, this routine is called for each window to figure out which one has been selected. The selected window will return true, while all others will return false. 'currentWindowString' is starting window 'target' is new window (which might be relative to the current one, e.g., "_parent") """ return self.get_boolean("getWhetherThisWindowMatchWindowExpression", [currentWindowString,target,]) def wait_for_pop_up(self,windowID,timeout): """ Waits for a popup window to appear and load up. 'windowID' is the JavaScript window "name" of the window that will appear (not the text of the title bar) If unspecified, or specified as "null", this command will wait for the first non-top window to appear (don't rely on this if you are working with multiple popups simultaneously). 'timeout' is a timeout in milliseconds, after which the action will return with an error. If this value is not specified, the default Selenium timeout will be used. See the setTimeout() command. """ self.do_command("waitForPopUp", [windowID,timeout,]) def choose_cancel_on_next_confirmation(self): """ By default, Selenium's overridden window.confirm() function will return true, as if the user had manually clicked OK; after running this command, the next call to confirm() will return false, as if the user had clicked Cancel. Selenium will then resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call this command for each confirmation. Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail. """ self.do_command("chooseCancelOnNextConfirmation", []) def choose_ok_on_next_confirmation(self): """ Undo the effect of calling chooseCancelOnNextConfirmation. Note that Selenium's overridden window.confirm() function will normally automatically return true, as if the user had manually clicked OK, so you shouldn't need to use this command unless for some reason you need to change your mind prior to the next confirmation. After any confirmation, Selenium will resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each confirmation. Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail. """ self.do_command("chooseOkOnNextConfirmation", []) def answer_on_next_prompt(self,answer): """ Instructs Selenium to return the specified answer string in response to the next JavaScript prompt [window.prompt()]. 'answer' is the answer to give in response to the prompt pop-up """ self.do_command("answerOnNextPrompt", [answer,]) def go_back(self): """ Simulates the user clicking the "back" button on their browser. """ self.do_command("goBack", []) def refresh(self): """ Simulates the user clicking the "Refresh" button on their browser. """ self.do_command("refresh", []) def close(self): """ Simulates the user clicking the "close" button in the titlebar of a popup window or tab. """ self.do_command("close", []) def is_alert_present(self): """ Has an alert occurred? This function never throws an exception """ return self.get_boolean("isAlertPresent", []) def is_prompt_present(self): """ Has a prompt occurred? This function never throws an exception """ return self.get_boolean("isPromptPresent", []) def is_confirmation_present(self): """ Has confirm() been called? This function never throws an exception """ return self.get_boolean("isConfirmationPresent", []) def get_alert(self): """ Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts. Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail. Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog. Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK. """ return self.get_string("getAlert", []) def get_confirmation(self): """ Retrieves the message of a JavaScript confirmation dialog generated during the previous action. By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command. If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail. NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog. NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK. """ return self.get_string("getConfirmation", []) def get_prompt(self): """ Retrieves the message of a JavaScript question prompt dialog generated during the previous action. Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail. NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog. NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK. """ return self.get_string("getPrompt", []) def get_location(self): """ Gets the absolute URL of the current page. """ return self.get_string("getLocation", []) def get_title(self): """ Gets the title of the current page. """ return self.get_string("getTitle", []) def get_body_text(self): """ Gets the entire text of the page. """ return self.get_string("getBodyText", []) def get_value(self,locator): """ Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter). For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not. 'locator' is an element locator """ return self.get_string("getValue", [locator,]) def get_text(self,locator): """ Gets the text of an element. This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user. 'locator' is an element locator """ return self.get_string("getText", [locator,]) def highlight(self,locator): """ Briefly changes the backgroundColor of the specified element yellow. Useful for debugging. 'locator' is an element locator """ self.do_command("highlight", [locator,]) def get_eval(self,script): """ Gets the result of evaluating the specified JavaScript snippet. The snippet may have multiple lines, but only the result of the last line will be returned. Note that, by default, the snippet will run in the context of the "selenium" object itself, so ``this`` will refer to the Selenium object. Use ``window`` to refer to the window of your application, e.g. ``window.document.getElementById('foo')`` If you need to use a locator to refer to a single element in your application page, you can use ``this.browserbot.findElement("id=foo")`` where "id=foo" is your locator. 'script' is the JavaScript snippet to run """ return self.get_string("getEval", [script,]) def is_checked(self,locator): """ Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button. 'locator' is an element locator pointing to a checkbox or radio button """ return self.get_boolean("isChecked", [locator,]) def get_table(self,tableCellAddress): """ Gets the text from a cell of a table. The cellAddress syntax tableLocator.row.column, where row and column start at 0. 'tableCellAddress' is a cell address, e.g. "foo.1.4" """ return self.get_string("getTable", [tableCellAddress,]) def get_selected_labels(self,selectLocator): """ Gets all option labels (visible text) for selected options in the specified select or multi-select element. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_string_array("getSelectedLabels", [selectLocator,]) def get_selected_label(self,selectLocator): """ Gets option label (visible text) for selected option in the specified select element. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_string("getSelectedLabel", [selectLocator,]) def get_selected_values(self,selectLocator): """ Gets all option values (value attributes) for selected options in the specified select or multi-select element. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_string_array("getSelectedValues", [selectLocator,]) def get_selected_value(self,selectLocator): """ Gets option value (value attribute) for selected option in the specified select element. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_string("getSelectedValue", [selectLocator,]) def get_selected_indexes(self,selectLocator): """ Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_string_array("getSelectedIndexes", [selectLocator,]) def get_selected_index(self,selectLocator): """ Gets option index (option number, starting at 0) for selected option in the specified select element. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_string("getSelectedIndex", [selectLocator,]) def get_selected_ids(self,selectLocator): """ Gets all option element IDs for selected options in the specified select or multi-select element. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_string_array("getSelectedIds", [selectLocator,]) def get_selected_id(self,selectLocator): """ Gets option element ID for selected option in the specified select element. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_string("getSelectedId", [selectLocator,]) def is_something_selected(self,selectLocator): """ Determines whether some option in a drop-down menu is selected. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_boolean("isSomethingSelected", [selectLocator,]) def get_select_options(self,selectLocator): """ Gets all option labels in the specified select drop-down. 'selectLocator' is an element locator identifying a drop-down menu """ return self.get_string_array("getSelectOptions", [selectLocator,]) def get_attribute(self,attributeLocator): """ Gets the value of an element attribute. The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example). 'attributeLocator' is an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" """ return self.get_string("getAttribute", [attributeLocator,]) def is_text_present(self,pattern): """ Verifies that the specified text pattern appears somewhere on the rendered page shown to the user. 'pattern' is a pattern to match with the text of the page """ return self.get_boolean("isTextPresent", [pattern,]) def is_element_present(self,locator): """ Verifies that the specified element is somewhere on the page. 'locator' is an element locator """ return self.get_boolean("isElementPresent", [locator,]) def is_visible(self,locator): """ Determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present. 'locator' is an element locator """ return self.get_boolean("isVisible", [locator,]) def is_editable(self,locator): """ Determines whether the specified input element is editable, ie hasn't been disabled. This method will fail if the specified element isn't an input element. 'locator' is an element locator """ return self.get_boolean("isEditable", [locator,]) def get_all_buttons(self): """ Returns the IDs of all buttons on the page. If a given button has no ID, it will appear as "" in this array. """ return self.get_string_array("getAllButtons", []) def get_all_links(self): """ Returns the IDs of all links on the page. If a given link has no ID, it will appear as "" in this array. """ return self.get_string_array("getAllLinks", []) def get_all_fields(self): """ Returns the IDs of all input fields on the page. If a given field has no ID, it will appear as "" in this array. """ return self.get_string_array("getAllFields", []) def get_attribute_from_all_windows(self,attributeName): """ Returns every instance of some attribute from all known windows. 'attributeName' is name of an attribute on the windows """ return self.get_string_array("getAttributeFromAllWindows", [attributeName,]) def dragdrop(self,locator,movementsString): """ deprecated - use dragAndDrop instead 'locator' is an element locator 'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" """ self.do_command("dragdrop", [locator,movementsString,]) def set_mouse_speed(self,pixels): """ Configure the number of pixels between "mousemove" events during dragAndDrop commands (default=10). Setting this value to 0 means that we'll send a "mousemove" event to every single pixel in between the start location and the end location; that can be very slow, and may cause some browsers to force the JavaScript to timeout. If the mouse speed is greater than the distance between the two dragged objects, we'll just send one "mousemove" at the start location and then one final one at the end location. 'pixels' is the number of pixels between "mousemove" events """ self.do_command("setMouseSpeed", [pixels,]) def get_mouse_speed(self): """ Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10). """ return self.get_number("getMouseSpeed", []) def drag_and_drop(self,locator,movementsString): """ Drags an element a certain distance and then drops it 'locator' is an element locator 'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" """ self.do_command("dragAndDrop", [locator,movementsString,]) def drag_and_drop_to_object(self,locatorOfObjectToBeDragged,locatorOfDragDestinationObject): """ Drags an element and drops it on another element 'locatorOfObjectToBeDragged' is an element to be dragged 'locatorOfDragDestinationObject' is an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped """ self.do_command("dragAndDropToObject", [locatorOfObjectToBeDragged,locatorOfDragDestinationObject,]) def window_focus(self): """ Gives focus to the currently selected window """ self.do_command("windowFocus", []) def window_maximize(self): """ Resize currently selected window to take up the entire screen """ self.do_command("windowMaximize", []) def get_all_window_ids(self): """ Returns the IDs of all windows that the browser knows about. """ return self.get_string_array("getAllWindowIds", []) def get_all_window_names(self): """ Returns the names of all windows that the browser knows about. """ return self.get_string_array("getAllWindowNames", []) def get_all_window_titles(self): """ Returns the titles of all windows that the browser knows about. """ return self.get_string_array("getAllWindowTitles", []) def get_html_source(self): """ Returns the entire HTML source between the opening and closing "html" tags. """ return self.get_string("getHtmlSource", []) def set_cursor_position(self,locator,position): """ Moves the text cursor to the specified position in the given input element or textarea. This method will fail if the specified element isn't an input element or textarea. 'locator' is an element locator pointing to an input element or textarea 'position' is 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. """ self.do_command("setCursorPosition", [locator,position,]) def get_element_index(self,locator): """ Get the relative index of an element to its parent (starting from 0). The comment node and empty text node will be ignored. 'locator' is an element locator pointing to an element """ return self.get_number("getElementIndex", [locator,]) def is_ordered(self,locator1,locator2): """ Check if these two elements have same parent and are ordered siblings in the DOM. Two same elements will not be considered ordered. 'locator1' is an element locator pointing to the first element 'locator2' is an element locator pointing to the second element """ return self.get_boolean("isOrdered", [locator1,locator2,]) def get_element_position_left(self,locator): """ Retrieves the horizontal position of an element 'locator' is an element locator pointing to an element OR an element itself """ return self.get_number("getElementPositionLeft", [locator,]) def get_element_position_top(self,locator): """ Retrieves the vertical position of an element 'locator' is an element locator pointing to an element OR an element itself """ return self.get_number("getElementPositionTop", [locator,]) def get_element_width(self,locator): """ Retrieves the width of an element 'locator' is an element locator pointing to an element """ return self.get_number("getElementWidth", [locator,]) def get_element_height(self,locator): """ Retrieves the height of an element 'locator' is an element locator pointing to an element """ return self.get_number("getElementHeight", [locator,]) def get_cursor_position(self,locator): """ Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers. Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243. This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element. 'locator' is an element locator pointing to an input element or textarea """ return self.get_number("getCursorPosition", [locator,]) def get_expression(self,expression): """ Returns the specified expression. This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression. 'expression' is the value to return """ return self.get_string("getExpression", [expression,]) def get_xpath_count(self,xpath): """ Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables. 'xpath' is the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. """ return self.get_number("getXpathCount", [xpath,]) def get_css_count(self,css): """ Returns the number of nodes that match the specified css selector, eg. "css=table" would give the number of tables. 'css' is the css selector to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. """ return self.get_number("getCssCount", [css,]) def assign_id(self,locator,identifier): """ Temporarily sets the "id" attribute of the specified element, so you can locate it in the future using its ID rather than a slow/complicated XPath. This ID will disappear once the page is reloaded. 'locator' is an element locator pointing to an element 'identifier' is a string to be used as the ID of the specified element """ self.do_command("assignId", [locator,identifier,]) def allow_native_xpath(self,allow): """ Specifies whether Selenium should use the native in-browser implementation of XPath (if any native version is available); if you pass "false" to this function, we will always use our pure-JavaScript xpath library. Using the pure-JS xpath library can improve the consistency of xpath element locators between different browser vendors, but the pure-JS version is much slower than the native implementations. 'allow' is boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath """ self.do_command("allowNativeXpath", [allow,]) def ignore_attributes_without_value(self,ignore): """ Specifies whether Selenium will ignore xpath attributes that have no value, i.e. are the empty string, when using the non-native xpath evaluation engine. You'd want to do this for performance reasons in IE. However, this could break certain xpaths, for example an xpath that looks for an attribute whose value is NOT the empty string. The hope is that such xpaths are relatively rare, but the user should have the option of using them. Note that this only influences xpath evaluation when using the ajaxslt engine (i.e. not "javascript-xpath"). 'ignore' is boolean, true means we'll ignore attributes without value at the expense of xpath "correctness"; false means we'll sacrifice speed for correctness. """ self.do_command("ignoreAttributesWithoutValue", [ignore,]) def wait_for_condition(self,script,timeout): """ Runs the specified JavaScript snippet repeatedly until it evaluates to "true". The snippet may have multiple lines, but only the result of the last line will be considered. Note that, by default, the snippet will be run in the runner's test window, not in the window of your application. To get the window of your application, you can use the JavaScript snippet ``selenium.browserbot.getCurrentWindow()``, and then run your JavaScript in there 'script' is the JavaScript snippet to run 'timeout' is a timeout in milliseconds, after which this command will return with an error """ self.do_command("waitForCondition", [script,timeout,]) def set_timeout(self,timeout): """ Specifies the amount of time that Selenium will wait for actions to complete. Actions that require waiting include "open" and the "waitFor\*" actions. The default timeout is 30 seconds. 'timeout' is a timeout in milliseconds, after which the action will return with an error """ self.do_command("setTimeout", [timeout,]) def wait_for_page_to_load(self,timeout): """ Waits for a new page to load. You can use this command instead of the "AndWait" suffixes, "clickAndWait", "selectAndWait", "typeAndWait" etc. (which are only available in the JS API). Selenium constantly keeps track of new pages loading, and sets a "newPageLoaded" flag when it first notices a page load. Running any other Selenium command after turns the flag to false. Hence, if you want to wait for a page to load, you must wait immediately after a Selenium command that caused a page-load. 'timeout' is a timeout in milliseconds, after which this command will return with an error """ self.do_command("waitForPageToLoad", [timeout,]) def wait_for_frame_to_load(self,frameAddress,timeout): """ Waits for a new frame to load. Selenium constantly keeps track of new pages and frames loading, and sets a "newPageLoaded" flag when it first notices a page load. See waitForPageToLoad for more information. 'frameAddress' is FrameAddress from the server side 'timeout' is a timeout in milliseconds, after which this command will return with an error """ self.do_command("waitForFrameToLoad", [frameAddress,timeout,]) def get_cookie(self): """ Return all cookies of the current page under test. """ return self.get_string("getCookie", []) def get_cookie_by_name(self,name): """ Returns the value of the cookie with the specified name, or throws an error if the cookie is not present. 'name' is the name of the cookie """ return self.get_string("getCookieByName", [name,]) def is_cookie_present(self,name): """ Returns true if a cookie with the specified name is present, or false otherwise. 'name' is the name of the cookie """ return self.get_boolean("isCookiePresent", [name,]) def create_cookie(self,nameValuePair,optionsString): """ Create a new cookie whose path and domain are same with those of current page under test, unless you specified a path for this cookie explicitly. 'nameValuePair' is name and value of the cookie in a format "name=value" 'optionsString' is 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. """ self.do_command("createCookie", [nameValuePair,optionsString,]) def delete_cookie(self,name,optionsString): """ Delete a named cookie with specified path and domain. Be careful; to delete a cookie, you need to delete it using the exact same path and domain that were used to create the cookie. If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. Also note that specifying a domain that isn't a subset of the current domain will usually fail. Since there's no way to discover at runtime the original path and domain of a given cookie, we've added an option called 'recurse' to try all sub-domains of the current domain with all paths that are a subset of the current path. Beware; this option can be slow. In big-O notation, it operates in O(n\*m) time, where n is the number of dots in the domain name and m is the number of slashes in the path. 'name' is the name of the cookie to be deleted 'optionsString' is 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. """ self.do_command("deleteCookie", [name,optionsString,]) def delete_all_visible_cookies(self): """ Calls deleteCookie with recurse=true on all cookies visible to the current page. As noted on the documentation for deleteCookie, recurse=true can be much slower than simply deleting the cookies using a known domain/path. """ self.do_command("deleteAllVisibleCookies", []) def set_browser_log_level(self,logLevel): """ Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded. Valid logLevel strings are: "debug", "info", "warn", "error" or "off". To see the browser logs, you need to either show the log window in GUI mode, or enable browser-side logging in Selenium RC. 'logLevel' is one of the following: "debug", "info", "warn", "error" or "off" """ self.do_command("setBrowserLogLevel", [logLevel,]) def run_script(self,script): """ Creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command. Scripts run in this way can often be debugged more easily than scripts executed using Selenium's "getEval" command. Beware that JS exceptions thrown in these script tags aren't managed by Selenium, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception. 'script' is the JavaScript snippet to run """ self.do_command("runScript", [script,]) def add_location_strategy(self,strategyName,functionDefinition): """ Defines a new function for Selenium to locate elements on the page. For example, if you define the strategy "foo", and someone runs click("foo=blah"), we'll run your function, passing you the string "blah", and click on the element that your function returns, or throw an "Element not found" error if your function returns null. We'll pass three arguments to your function: * locator: the string the user passed in * inWindow: the currently selected window * inDocument: the currently selected document The function must return null if the element can't be found. 'strategyName' is the name of the strategy to define; this should use only letters [a-zA-Z] with no spaces or other punctuation. 'functionDefinition' is a string defining the body of a function in JavaScript. For example: ``return inDocument.getElementById(locator);`` """ self.do_command("addLocationStrategy", [strategyName,functionDefinition,]) def capture_entire_page_screenshot(self,filename,kwargs): """ Saves the entire contents of the current window canvas to a PNG file. Contrast this with the captureScreenshot command, which captures the contents of the OS viewport (i.e. whatever is currently being displayed on the monitor), and is implemented in the RC only. Currently this only works in Firefox when running in chrome mode, and in IE non-HTA using the EXPERIMENTAL "Snapsie" utility. The Firefox implementation is mostly borrowed from the Screengrab! Firefox extension. Please see http://www.screengrab.org and http://snapsie.sourceforge.net/ for details. 'filename' is 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. 'kwargs' is a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" Currently valid options: * background 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). """ self.do_command("captureEntirePageScreenshot", [filename,kwargs,]) def rollup(self,rollupName,kwargs): """ Executes a command rollup, which is a series of commands with a unique name, and optionally arguments that control the generation of the set of commands. If any one of the rolled-up commands fails, the rollup is considered to have failed. Rollups may also contain nested rollups. 'rollupName' is the name of the rollup command 'kwargs' is keyword arguments string that influences how the rollup expands into commands """ self.do_command("rollup", [rollupName,kwargs,]) def add_script(self,scriptContent,scriptTagId): """ Loads script content into a new script tag in the Selenium document. This differs from the runScript command in that runScript adds the script tag to the document of the AUT, not the Selenium document. The following entities in the script content are replaced by the characters they represent: < > & The corresponding remove command is removeScript. 'scriptContent' is the Javascript content of the script to add 'scriptTagId' is (optional) the id of the new script tag. If specified, and an element with this id already exists, this operation will fail. """ self.do_command("addScript", [scriptContent,scriptTagId,]) def remove_script(self,scriptTagId): """ Removes a script tag from the Selenium document identified by the given id. Does nothing if the referenced tag doesn't exist. 'scriptTagId' is the id of the script element to remove. """ self.do_command("removeScript", [scriptTagId,]) def use_xpath_library(self,libraryName): """ Allows choice of one of the available libraries. 'libraryName' is name of the desired library Only the following three can be chosen: * "ajaxslt" - Google's library * "javascript-xpath" - 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. """ self.do_command("useXpathLibrary", [libraryName,]) def set_context(self,context): """ Writes a message to the status bar and adds a note to the browser-side log. 'context' is the message to be sent to the browser """ self.do_command("setContext", [context,]) def attach_file(self,fieldLocator,fileLocator): """ Sets a file input (upload) field to the file listed in fileLocator 'fieldLocator' is an element locator 'fileLocator' is 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. """ self.do_command("attachFile", [fieldLocator,fileLocator,]) def capture_screenshot(self,filename): """ Captures a PNG screenshot to the specified file. 'filename' is the absolute path to the file to be written, e.g. "c:\blah\screenshot.png" """ self.do_command("captureScreenshot", [filename,]) def capture_screenshot_to_string(self): """ Capture a PNG screenshot. It then returns the file as a base 64 encoded string. """ return self.get_string("captureScreenshotToString", []) def captureNetworkTraffic(self, type): """ Returns the network traffic seen by the browser, including headers, AJAX requests, status codes, and timings. When this function is called, the traffic log is cleared, so the returned content is only the traffic seen since the last call. 'type' is The type of data to return the network traffic as. Valid values are: json, xml, or plain. """ return self.get_string("captureNetworkTraffic", [type,]) def capture_network_traffic(self, type): return self.captureNetworkTraffic(type) def addCustomRequestHeader(self, key, value): """ Tells the Selenium server to add the specificed key and value as a custom outgoing request header. This only works if the browser is configured to use the built in Selenium proxy. 'key' the header name. 'value' the header value. """ return self.do_command("addCustomRequestHeader", [key,value,]) def add_custom_request_header(self, key, value): return self.addCustomRequestHeader(key, value) def capture_entire_page_screenshot_to_string(self,kwargs): """ Downloads a screenshot of the browser current window canvas to a based 64 encoded PNG file. The \ *entire* windows canvas is captured, including parts rendered outside of the current view port. Currently this only works in Mozilla and when running in chrome mode. 'kwargs' is 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). """ return self.get_string("captureEntirePageScreenshotToString", [kwargs,]) def shut_down_selenium_server(self): """ Kills the running Selenium Server and all browser sessions. After you run this command, you will no longer be able to send commands to the server; you can't remotely start the server once it has been stopped. Normally you should prefer to run the "stop" command, which terminates the current browser session, rather than shutting down the entire server. """ self.do_command("shutDownSeleniumServer", []) def retrieve_last_remote_control_logs(self): """ Retrieve the last messages logged on a specific remote control. Useful for error reports, especially when running multiple remote controls in a distributed environment. The maximum number of log messages that can be retrieve is configured on remote control startup. """ return self.get_string("retrieveLastRemoteControlLogs", []) def key_down_native(self,keycode): """ Simulates a user pressing a key (without releasing it yet) by sending a native operating system keystroke. This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command. 'keycode' is an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! """ self.do_command("keyDownNative", [keycode,]) def key_up_native(self,keycode): """ Simulates a user releasing a key by sending a native operating system keystroke. This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command. 'keycode' is an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! """ self.do_command("keyUpNative", [keycode,]) def key_press_native(self,keycode): """ Simulates a user pressing and releasing a key by sending a native operating system keystroke. This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command. 'keycode' is an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! """ self.do_command("keyPressNative", [keycode,]) selenium-2.25.0/py/selenium/webdriver/000755 000765 000120 00000000000 12001624431 021142 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/webdriver/__init__.py000644 000765 000120 00000002176 12001615670 023266 0ustar00davidburnsadmin000000 000000 #!/usr/bin/python # # Copyright 2008-2010 Webdriver_name committers # Copyright 2008-2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from firefox.webdriver import WebDriver as Firefox from firefox.firefox_profile import FirefoxProfile from chrome.webdriver import WebDriver as Chrome from chrome.options import Options as ChromeOptions from ie.webdriver import WebDriver as Ie from opera.webdriver import WebDriver as Opera from remote.webdriver import WebDriver as Remote from common.desired_capabilities import DesiredCapabilities from common.action_chains import ActionChains from common.proxy import Proxy __version__ = '2.25.0' selenium-2.25.0/py/selenium/webdriver/chrome/000755 000765 000120 00000000000 12001624431 022417 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/webdriver/common/000755 000765 000120 00000000000 12001624431 022432 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/webdriver/firefox/000755 000765 000120 00000000000 12001624431 022604 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/webdriver/ie/000755 000765 000120 00000000000 12001624431 021537 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/webdriver/opera/000755 000765 000120 00000000000 12001624431 022250 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/webdriver/remote/000755 000765 000120 00000000000 12001624431 022435 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/webdriver/support/000755 000765 000120 00000000000 12001624431 022656 5ustar00davidburnsadmin000000 000000 selenium-2.25.0/py/selenium/webdriver/support/__init__.py000644 000765 000120 00000001135 11754416741 025010 0ustar00davidburnsadmin000000 000000 #!/usr/bin/python # # Copyright 2011 WebDriver committers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. selenium-2.25.0/py/selenium/webdriver/support/abstract_event_listener.py000644 000765 000024 00000003435 11771267636 030213 0ustar00davidburnsstaff000000 000000 #!/usr/bin/python # # Copyright 2011 Software Freedom Conservancy. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. class AbstractEventListener(object): """ Event listener must subclass and implement this fully or partially """ def before_navigate_to(self, url, driver): pass def after_navigate_to(self, url, driver): pass def before_navigate_back(self, driver): pass def after_navigate_back(self, driver): pass def before_navigate_forward(self, driver): pass def after_navigate_forward(self, driver): pass def before_find(self, by, value, driver): pass def after_find(self, by, value, driver): pass def before_click(self, element, driver): pass def after_click(self, element, driver): pass def before_change_value_of(self, element, driver): pass def after_change_value_of(self, element, driver): pass def before_execute_script(self, script, driver): pass def after_execute_script(self, script, driver): pass def before_close(self, driver): pass def after_close(self, driver): pass def before_quit(self, driver): pass def after_quit(self, driver): pass def on_exception(self, exception, driver): pass selenium-2.25.0/py/selenium/webdriver/support/event_firing_webdriver.py000644 000765 000024 00000030345 11771270371 030020 0ustar00davidburnsstaff000000 000000 #!/usr/bin/python # # Copyright 2011 Software Freedom Conservancy. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from selenium.common.exceptions import WebDriverException from selenium.webdriver.common.by import By from selenium.webdriver.remote.webdriver import WebDriver from selenium.webdriver.remote.webelement import WebElement from abstract_event_listener import AbstractEventListener def _wrap_elements(result, ef_driver): if isinstance(result, WebElement): return EventFiringWebElement(result, ef_driver) elif isinstance(result, list): return [_wrap_elements(item, ef_driver) for item in result] else: return result class EventFiringWebDriver(object): """ A wrapper around an arbitrary WebDriver instance which supports firing events """ def __init__(self, driver, event_listener): """ Creates a new instance of the EventFiringWebDriver :Args: - driver : A WebDriver instance - event_listener : Instance of a class that subclasses AbstractEventListener and implements it fully or partially Example: from selenium.webdriver import Firefox from selenium.webdriver.support.events import EventFiringWebDriver, AbstractEventListener class MyListener(AbstractEventListener): def before_navigate_to(self, url, driver): print "Before navigate to %s" % url def after_navigate_to(self, url, driver): print "After navigate to %s" % url driver = Firefox() ef_driver = EventFiringWebDriver(driver, MyListener()) ef_driver.get("http://www.google.co.in/") """ if not isinstance(driver, WebDriver): raise WebDriverException("A WebDriver instance must be supplied") if not isinstance(event_listener, AbstractEventListener): raise WebDriverException("Event listener must be a subclass of AbstractEventListener") self._driver = driver self._listener = event_listener @property def wrapped_driver(self): """Returns the WebDriver instance wrapped by this EventsFiringWebDriver""" return self._driver def get(self, url): self._dispatch("navigate_to", (url, self._driver), "get", (url, )) def back(self): self._dispatch("navigate_back", (self._driver,), "back", ()) def forward(self): self._dispatch("navigate_forward", (self._driver,), "forward", ()) def execute_script(self, script, *args): unwrapped_args = (script,) + self._unwrap_element_args(args) return self._dispatch("execute_script", (script, self._driver), "execute_script", unwrapped_args) def execute_async_script(self, script, *args): unwrapped_args = (script,) + self._unwrap_element_args(args) return self._dispatch("execute_script", (script, self._driver), "execute_async_script", unwrapped_args) def close(self): self._dispatch("close", (self._driver,), "close", ()) def quit(self): self._dispatch("quit", (self._driver,), "quit", ()) def find_element(self, by=By.ID, value=None): return self._dispatch("find", (by, value, self._driver), "find_element", (by, value)) def find_elements(self, by=By.ID, value=None): return self._dispatch("find", (by, value, self._driver), "find_elements", (by, value)) def find_element_by_id(self, id_): return self.find_element(by=By.ID, value=id_) def find_elements_by_id(self, id_): return self.find_elements(by=By.ID, value=id_) def find_element_by_xpath(self, xpath): return self.find_element(by=By.XPATH, value=xpath) def find_elements_by_xpath(self, xpath): return self.find_elements(by=By.XPATH, value=xpath) def find_element_by_link_text(self, link_text): return self.find_element(by=By.LINK_TEXT, value=link_text) def find_elements_by_link_text(self, text): return self.find_elements(by=By.LINK_TEXT, value=text) def find_element_by_partial_link_text(self, link_text): return self.find_element(by=By.PARTIAL_LINK_TEXT, value=link_text) def find_elements_by_partial_link_text(self, link_text): return self.find_elements(by=By.PARTIAL_LINK_TEXT, value=link_text) def find_element_by_name(self, name): return self.find_element(by=By.NAME, value=name) def find_elements_by_name(self, name): return self.find_elements(by=By.NAME, value=name) def find_element_by_tag_name(self, name): return self.find_element(by=By.TAG_NAME, value=name) def find_elements_by_tag_name(self, name): return self.find_elements(by=By.TAG_NAME, value=name) def find_element_by_class_name(self, name): return self.find_element(by=By.CLASS_NAME, value=name) def find_elements_by_class_name(self, name): return self.find_elements(by=By.CLASS_NAME, value=name) def find_element_by_css_selector(self, css_selector): return self.find_element(by=By.CSS_SELECTOR, value=css_selector) def find_elements_by_css_selector(self, css_selector): return self.find_elements(by=By.CSS_SELECTOR, value=css_selector) def _dispatch(self, l_call, l_args, d_call, d_args): getattr(self._listener, "before_%s" % l_call)(*l_args) try: result = getattr(self._driver, d_call)(*d_args) except Exception, e: self._listener.on_exception(e, self._driver) raise e getattr(self._listener, "after_%s" % l_call)(*l_args) return _wrap_elements(result, self) def _unwrap_element_args(self, args): if isinstance(args, EventFiringWebElement): return args.wrapped_element elif isinstance(args, tuple): return tuple([self._unwrap_element_args(item) for item in args]) elif isinstance(args, list): return [self._unwrap_element_args(item) for item in args] else: return args def __setattr__(self, item, value): if item.startswith("_") or not hasattr(self._driver, item): object.__setattr__(self, item, value) else: try: object.__setattr__(self._driver, item, value) except Exception, e: self._listener.on_exception(e, self._driver) raise e def __getattr__(self, name): def _wrap(*args): try: result = attrib(*args) return _wrap_elements(result, self) except Exception, e: self._listener.on_exception(e, self._driver) raise e if hasattr(self._driver, name): try: attrib = getattr(self._driver, name) if not callable(attrib): return attrib except Exception, e: self._listener.on_exception(e, self._driver) raise e return _wrap raise AttributeError(name) class EventFiringWebElement(object): """" A wrapper around WebElement instance which supports firing events """ def __init__(self, webelement, ef_driver): """ Creates a new instance of the EventFiringWebElement """ self._webelement = webelement self._ef_driver = ef_driver self._driver = ef_driver.wrapped_driver self._listener = ef_driver._listener @property def wrapped_element(self): """Returns the WebElement wrapped by this EventFiringWebElement instance""" return self._webelement def click(self): self._dispatch("click", (self._webelement, self._driver), "click", ()) def clear(self): self._dispatch("change_value_of", (self._webelement, self._driver), "clear", ()) def send_keys(self, *value): self._dispatch("change_value_of", (self._webelement, self._driver), "send_keys", value) def find_element(self, by=By.ID, value=None): return self._dispatch("find", (by, value, self._driver), "find_element", (by, value)) def find_elements(self, by=By.ID, value=None): return self._dispatch("find", (by, value, self._driver), "find_elements", (by, value)) def find_element_by_id(self, id_): return self.find_element(by=By.ID, value=id_) def find_elements_by_id(self, id_): return self.find_elements(by=By.ID, value=id_) def find_element_by_name(self, name): return self.find_element(by=By.NAME, value=name) def find_elements_by_name(self, name): return self.find_elements(by=By.NAME, value=name) def find_element_by_link_text(self, link_text): return self.find_element(by=By.LINK_TEXT, value=link_text) def find_elements_by_link_text(self, link_text): return self.find_elements(by=By.LINK_TEXT, value=link_text) def find_element_by_partial_link_text(self, link_text): return self.find_element(by=By.PARTIAL_LINK_TEXT, value=link_text) def find_elements_by_partial_link_text(self, link_text): return self.find_elements(by=By.PARTIAL_LINK_TEXT, value=link_text) def find_element_by_tag_name(self, name): return self.find_element(by=By.TAG_NAME, value=name) def find_elements_by_tag_name(self, name): return self.find_elements(by=By.TAG_NAME, value=name) def find_element_by_xpath(self, xpath): return self.find_element(by=By.XPATH, value=xpath) def find_elements_by_xpath(self, xpath): return self.find_elements(by=By.XPATH, value=xpath) def find_element_by_class_name(self, name): return self.find_element(by=By.CLASS_NAME, value=name) def find_elements_by_class_name(self, name): return self.find_elements(by=By.CLASS_NAME, value=name) def find_element_by_css_selector(self, css_selector): return self.find_element(by=By.CSS_SELECTOR, value=css_selector) def find_elements_by_css_selector(self, css_selector): return self.find_elements(by=By.CSS_SELECTOR, value=css_selector) def _dispatch(self, l_call, l_args, d_call, d_args): getattr(self._listener, "before_%s" % l_call)(*l_args) try: result = getattr(self._webelement, d_call)(*d_args) except Exception, e: self._listener.on_exception(e, self._driver) raise e getattr(self._listener, "after_%s" % l_call)(*l_args) return _wrap_elements(result, self._ef_driver) def __setattr__(self, item, value): if item.startswith("_") or not hasattr(self._webelement, item): object.__setattr__(self, item, value) else: try: object.__setattr__(self._webelement, item, value) except Exception, e: self._listener.on_exception(e, self._driver) raise e def __getattr__(self, name): def _wrap(*args): try: result = attrib(*args) return _wrap_elements(result, self._ef_driver) except Exception, e: self._listener.on_exception(e, self._driver) raise e if hasattr(self._webelement, name): try: attrib = getattr(self._webelement, name) if not callable(attrib): return attrib except Exception, e: self._listener.on_exception(e, self._driver) raise e return _wrap raise AttributeError(name) selenium-2.25.0/py/selenium/webdriver/support/events.py000644 000765 000024 00000001330 11771267636 024576 0ustar00davidburnsstaff000000 000000 #!/usr/bin/python # # Copyright 2011 Software Freedom Conservancy. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from abstract_event_listener import AbstractEventListener from event_firing_webdriver import EventFiringWebDriver selenium-2.25.0/py/selenium/webdriver/support/select.py000644 000765 000120 00000020354 11754416741 024534 0ustar00davidburnsadmin000000 000000 #!/usr/bin/python # # Copyright 2011 Software Freedom Conservancy. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException, UnexpectedTagNameException class Select: def __init__(self, webelement): """ Constructor. A check is made that the given element is, indeed, a SELECT tag. If it is not, then an UnexpectedTagNameException is thrown. :Args: - webelement - element SELECT element to wrap Example: from selenium.webdriver.support.ui import Select \n Select(driver.find_element_by_tag_name("select")).select_by_index(2) """ if webelement.tag_name.lower() != "select": raise UnexpectedTagNameException( "Select only works on