├── MANIFEST.in ├── README.rst ├── docs ├── Selenium2Library-1.8.0.html ├── Selenium2Library.html └── index.html ├── requirements.txt ├── setup.cfg ├── setup.py └── src └── Selenium2Library └── __init__.py /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include MANIFEST.in 2 | include *.txt 3 | include *.rst 4 | exclude */*.txt # limit previous command to include only *.txt files in root folder 5 | exclude */*.rst # limit previous command to include only *.rst files in root folder 6 | 7 | include docs/Selenium2Library.html 8 | 9 | recursive-include src *.py 10 | graft src/Selenium2Library/resources 11 | recursive-exclude src *.pyc 12 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Selenium2Library 2 | ================ 3 | 4 | Selenium2Library is a web testing library for `Robot Framework`_ 5 | that uses the Selenium_ tool internally. The project is hosted on 6 | GitHub_ and downloads can be found from PyPI_. 7 | 8 | Starting from version 3.0, Selenium2Library is renamed to SeleniumLibrary_ 9 | and this project exists mainly to help with transitioning. 10 | 11 | Versions 12 | -------- 13 | 14 | Selenium2Library 3.0 and newer extend the new SeleniumLibrary_ and thus 15 | contain exactly the same code and functionality. There have been lot of 16 | internal changes in the library, but external functionality provided by 17 | keywords should be fully backwards compatible. Libraries and tools using 18 | Selenium2Library internally may need to be updated to support 19 | Selenium2Library 3.0, though. Selenium2Library 1.8 is the latest, and last, 20 | legacy version with the old architecture and code. 21 | 22 | Selenium2Library 3.0 supports Python 2.7 as well as Python 3.3 and newer. 23 | Selenium2Library 1.8 supports Python 2.6-2.7. 24 | 25 | Keyword documentation 26 | --------------------- 27 | 28 | - `Selenium2Library 3.0`__ (latest) 29 | - `Selenium2Library 1.8`__ (legacy) 30 | 31 | __ http://robotframework.org/Selenium2Library/Selenium2Library.html 32 | __ http://robotframework.org/Selenium2Library/Selenium2Library-1.8.0.html 33 | 34 | Installation 35 | ------------ 36 | 37 | The recommended approach to install Selenium2Library, regardless the version, 38 | is using pip_. 39 | 40 | Install (or upgrade) the latest Selenium2Library version:: 41 | 42 | pip install --upgrade robotframework-selenium2library 43 | 44 | Install the legacy Selenium2Library 1.8.0 version:: 45 | 46 | pip install robotframework-selenium2library==1.8.0 47 | 48 | Migrating to SeleniumLibrary 49 | ---------------------------- 50 | 51 | Existing Selenium2Library users should start migrating to the 52 | SeleniumLibrary_. For most users this should be a simple procedure: 53 | 54 | 1. Install the latest Selenium2Library as explained above. This installs 55 | both SeleniumLibrary and Selenium2Library, and in fact Selenium2Library 56 | is nowadays just a thin wrapper for SeleniumLibrary. 57 | 58 | 2. Execute tests normally to see are there problems. 59 | 60 | 3. If problems are encountered, try on investigate why they occur. Possible 61 | problems can be divided into two categories: 62 | 63 | - If a keyword provided by the library itself has changed, take a look at 64 | `SeleniumLibrary 3.0 release notes`_ to see is it a known backwards 65 | incompatible change. If it isn't, you may have encountered a regression 66 | that ought to be reported to `SeleniumLibrary issue tracker`_. 67 | 68 | - If a library using Selenium2Library does not work anymore, it is likely 69 | due to the large internal changes in SeleniumLibrary 3.0. Report the 70 | problem to the maintainers of the broken library or fix the problem 71 | yourself if you are the maintainer. 72 | 73 | Regardless the problem, you can always ask help on various `support 74 | channels`_. 75 | 76 | 4. If no problems occur or after problems have been resolved, you can start 77 | changing library imports to use ``SeleniumLibrary`` instead of 78 | ``Selenium2Library``. Also all keyword usages in form like 79 | ``Selenium2Library.Title Should Be`` need to be updated. 80 | 81 | 5. After test data has been updated, Selenium2Library installation can 82 | be removed altogether. 83 | 84 | .. _Robot Framework: http://robotframework.org 85 | .. _Selenium: http://seleniumhq.org 86 | .. _PyPI: https://pypi.python.org/pypi/robotframework-selenium2library 87 | .. _GitHub: https://github.com/robotframework/Selenium2Library 88 | .. _SeleniumLibrary: https://github.com/robotframework/SeleniumLibrary 89 | .. _pip: http://pip-installer.org 90 | .. _SeleniumLibrary 3.0 release notes: https://github.com/robotframework/SeleniumLibrary/blob/master/docs/SeleniumLibrary-3.0.0.rst 91 | .. _SeleniumLibrary issue tracker: https://github.com/robotframework/SeleniumLibrary/issues 92 | .. _support channels: http://robotframework.org/#support 93 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Robot Framework Selenium2Library 5 | 6 | 7 | 8 |

Robot Framework Selenium2Library

9 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | robotframework-seleniumlibrary >= 3.0.0 2 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2008-2011 Nokia Networks 2 | # Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors 3 | # Copyright 2016- Robot Framework Foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | [sdist] 19 | force-manifest=1 20 | 21 | [bdist_wininst] 22 | bitmap=selenium.bmp 23 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import re 4 | from os.path import abspath, dirname, join 5 | from setuptools import setup 6 | 7 | 8 | CURDIR = dirname(abspath(__file__)) 9 | 10 | with open(join(CURDIR, 'src', 'Selenium2Library', '__init__.py')) as f: 11 | VERSION = re.search("\n__version__ = '(.*)'", f.read()).group(1) 12 | 13 | with open(join(CURDIR, 'README.rst')) as f: 14 | DESCRIPTION = f.read() 15 | 16 | with open(join(CURDIR, 'requirements.txt')) as f: 17 | REQUIREMENTS = f.read().splitlines() 18 | 19 | setup(name = 'robotframework-selenium2library', 20 | version = VERSION, 21 | description = 'Web testing library for Robot Framework', 22 | long_description = DESCRIPTION, 23 | author = 'Tatu Aalto', 24 | author_email = 'aalto.tatu@gmail.com', 25 | url = 'https://github.com/robotframework/Selenium2Library', 26 | license = 'Apache License 2.0', 27 | keywords = 'robotframework testing testautomation selenium webdriver web', 28 | platforms = 'any', 29 | classifiers = [ 30 | "Development Status :: 5 - Production/Stable", 31 | "License :: OSI Approved :: Apache Software License", 32 | "Operating System :: OS Independent", 33 | "Programming Language :: Python", 34 | "Programming Language :: Python :: 2", 35 | "Programming Language :: Python :: 3", 36 | "Topic :: Software Development :: Testing", 37 | "Framework :: Robot Framework" 38 | ], 39 | install_requires = REQUIREMENTS, 40 | package_dir = {'' : 'src'}, 41 | packages = ['Selenium2Library'], 42 | include_package_data = True, 43 | ) 44 | -------------------------------------------------------------------------------- /src/Selenium2Library/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2008-2011 Nokia Networks 2 | # Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors 3 | # Copyright 2016- Robot Framework Foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | import inspect 18 | 19 | from SeleniumLibrary import SeleniumLibrary 20 | 21 | 22 | __version__ = '3.0.0' 23 | 24 | 25 | class Selenium2Library(SeleniumLibrary): 26 | 27 | ROBOT_LIBRARY_VERSION = __version__ 28 | 29 | def get_keyword_documentation(self, name): 30 | if name != '__intro__': 31 | doc = SeleniumLibrary.get_keyword_documentation(self, name) 32 | return doc.replace('SeleniumLibrary', 'Selenium2Library') 33 | intro = inspect.getdoc(SeleniumLibrary) 34 | intro = intro.replace('SeleniumLibrary', 'Selenium2Library') 35 | return """ 36 | --- 37 | *NOTE:* Selenium2Library has been renamed to SeleniumLibrary since version 3.0. 38 | Nowadays Selenium2Library is just a thin wrapper to SeleniumLibrary that eases 39 | with transitioning to the new project. See 40 | [https://github.com/robotframework/SeleniumLibrary|SeleniumLibrary] and 41 | [https://github.com/robotframework/Selenium2Library|Selenium2Library] 42 | project pages for more information. 43 | --- 44 | """ + intro 45 | --------------------------------------------------------------------------------