Commit 0260b1c8 authored by Sascha Girrulat's avatar Sascha Girrulat

Imported Upstream version 2.48.0

parent b6b24b42
Metadata-Version: 1.1
Name: selenium
Version: 2.47.1
Version: 2.48.0
Summary: Python bindings for Selenium
Home-page: https://github.com/SeleniumHQ/selenium/
Author: UNKNOWN
......@@ -44,7 +44,7 @@ Description: ======================
pip install -U selenium
Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-2.47.tar.gz), unarchive it, and run::
Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-2.48.tar.gz), unarchive it, and run::
python setup.py install
......@@ -115,11 +115,11 @@ Description: ======================
However, to use Selenium Webdriver Remote or the legacy Selenium API (Selenium-RC), you need to also run the Selenium server. The server requires a Java Runtime Environment (JRE).
Download the server separately, from: http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.0.jar
Download the server separately, from: http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.0.jar
Run the server from the command line::
java -jar selenium-server-standalone-2.47.0.jar
java -jar selenium-server-standalone-2.48.8.jar
Then run your Python client scripts.
......@@ -142,3 +142,4 @@ Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Selenium 2.48.0
* Update error pulling to match spec when we encounter a spec compliant browser.
* Disable tests that are not working with Marionette when running Marionette tests
* Add the ability to run python marionette tests
* Python 3 compatibility for remote Authorization
* changing casing of children finding tests
Selenium 2.47.3
* Bring back py 3 support
Selenium 2.47.2
* Fix running Edge driver locally on win10
* adding repr to WebDriver and WebElement
Selenium 2.47.1
* Fix the issue of deleting the profile when shutting down Firefox
* WebElement __eq__ compares against more types
......
......@@ -36,7 +36,7 @@ If you have `pip <http://www.pip-installer.org>`_ on your system, you can simply
pip install -U selenium
Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-2.47.tar.gz), unarchive it, and run::
Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-2.48.tar.gz), unarchive it, and run::
python setup.py install
......@@ -107,11 +107,11 @@ For normal WebDriver scripts (non-Remote), the Java server is not needed.
However, to use Selenium Webdriver Remote or the legacy Selenium API (Selenium-RC), you need to also run the Selenium server. The server requires a Java Runtime Environment (JRE).
Download the server separately, from: http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.0.jar
Download the server separately, from: http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.0.jar
Run the server from the command line::
java -jar selenium-server-standalone-2.47.0.jar
java -jar selenium-server-standalone-2.48.8.jar
Then run your Python client scripts.
......
......@@ -18,4 +18,4 @@
from selenium import selenium
__version__ = "2.47.1"
__version__ = "2.48.0"
......@@ -32,4 +32,4 @@ from .common.action_chains import ActionChains
from .common.touch_actions import TouchActions
from .common.proxy import Proxy
__version__ = '2.47.1'
__version__ = '2.48.0'
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you 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.remote.remote_connection import RemoteConnection
class ChromeRemoteConnection(RemoteConnection):
def __init__(self, remote_server_addr, keep_alive=True):
RemoteConnection.__init__(self, remote_server_addr, keep_alive)
self._commands["launchApp"] = ('POST',
'/session/$sessionId/chromium/launch_app')
......@@ -19,6 +19,7 @@ import base64
from selenium.webdriver.remote.command import Command
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
from selenium.common.exceptions import WebDriverException
from .remote_connection import ChromeRemoteConnection
from .service import Service
from .options import Options
......@@ -61,14 +62,18 @@ class WebDriver(RemoteWebDriver):
try:
RemoteWebDriver.__init__(self,
command_executor=self.service.service_url,
desired_capabilities=desired_capabilities,
keep_alive=True)
command_executor=ChromeRemoteConnection(
remote_server_addr=self.service.service_url),
desired_capabilities=desired_capabilities)
except:
self.quit()
raise
self._is_remote = False
def launch_app(self, id):
"""Launches Chrome app specified by id."""
return self.execute("launchApp", {'id': id})
def quit(self):
"""
Closes the browser and shuts down the ChromeDriver executable
......
......@@ -59,7 +59,7 @@ class Service(object):
"The EdgeDriver executable needs to be available in the path. "
"Please download from http://go.microsoft.com/fwlink/?LinkId=619687 ")
count = 0
while not utils.is_url_connectable(self.port):
while not utils.is_connectable(self.port):
count += 1
time.sleep(1)
if count == 30:
......
......@@ -17,6 +17,7 @@
from selenium.webdriver.common import utils
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
from selenium.webdriver.remote.remote_connection import RemoteConnection
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from .service import Service
......@@ -37,7 +38,8 @@ class WebDriver(RemoteWebDriver):
RemoteWebDriver.__init__(
self,
command_executor='http://localhost:%d' % self.port,
command_executor=RemoteConnection('http://localhost:%d' % self.port,
resolve_ip=False),
desired_capabilities=capabilities)
self._is_remote = False
......
......@@ -185,7 +185,8 @@ class FirefoxBinary(object):
built_path = ""
for path in paths:
library_path = os.path.join(profile.path, path)
os.makedirs(library_path)
if not os.path.exists(library_path):
os.makedirs(library_path)
import shutil
shutil.copy(os.path.join(os.path.dirname(__file__), path,
self.NO_FOCUS_LIBRARY_NAME),
......
......@@ -56,12 +56,13 @@ class Service(object):
or when it can't connect to the service
"""
env = self.env or os.environ
self.log_file = file("geckodriver.log", "w")
try:
#import pdb; pdb.set_trace()
self.process = subprocess.Popen([
self.path,
"-b", self.firefox_binary, '--webdriver-port', "%d" % self.port],
env=env, stdout=PIPE)
env=env, stdout=self.log_file, stderr=self.log_file)
except Exception as e:
raise WebDriverException(
"'" + os.path.basename(self.path) + "' executable needs to be \
......
......@@ -89,7 +89,7 @@ class WebDriver(RemoteWebDriver):
# Happens if Firefox shutsdown before we've read the response from
# the socket.
pass
if "marionette" in self.capabilities and self.capabilities['marionette'] is True:
if "specificationLevel" in self.capabilities:
self.service.stop()
else:
self.binary.kill()
......
......@@ -52,7 +52,8 @@
"toolkit.networkmanager.disable": true,
"toolkit.telemetry.prompted": 2,
"toolkit.telemetry.enabled": false,
"toolkit.telemetry.rejected": true
"toolkit.telemetry.rejected": true,
"xpinstall.signatures.required": false
},
"mutable": {
"browser.dom.window.dump.enabled": true,
......
......@@ -100,7 +100,7 @@ class ErrorHandler(object):
if value_json and isinstance(value_json, basestring):
import json
value = json.loads(value_json)
status = value['status']
status = value['error']
message = value['message']
exception_class = ErrorInResponseException
......
......@@ -161,12 +161,12 @@ class RemoteConnection(object):
"""
cls._timeout = socket._GLOBAL_DEFAULT_TIMEOUT
def __init__(self, remote_server_addr, keep_alive=False):
def __init__(self, remote_server_addr, keep_alive=False, resolve_ip=True):
# Attempt to resolve the hostname and get an IP address.
self.keep_alive = keep_alive
parsed_url = parse.urlparse(remote_server_addr)
addr = ""
if parsed_url.hostname:
if parsed_url.hostname and resolve_ip:
try:
netloc = socket.gethostbyname(parsed_url.hostname)
addr = netloc
......@@ -416,8 +416,8 @@ class RemoteConnection(object):
"Content-type": "application/json;charset=\"UTF-8\"",
"Accept": "application/json"}
if parsed_url.username:
auth = base64.standard_b64encode('%s:%s' %
(parsed_url.username, parsed_url.password)).replace('\n', '')
auth = base64.standard_b64encode(('%s:%s' %
(parsed_url.username, parsed_url.password)).encode('ascii')).decode('ascii').replace('\n', '')
headers["Authorization"] = "Basic %s" % auth
if body and method != 'POST' and method != 'PUT':
body = None
......
......@@ -89,6 +89,11 @@ class WebDriver(object):
self._mobile = Mobile(self)
self.file_detector = LocalFileDetector()
def __repr__(self):
return '<{0.__module__}.{0.__name__} (session="{1}")>'.format(
type(self), self.session_id)
@property
def mobile(self):
return self._mobile
......@@ -139,7 +144,7 @@ class WebDriver(object):
self.capabilities = response['value']
# Quick check to see if we have a W3C Compliant browser
self.w3c = "takesElementScreenshot" in self.capabilities
self.w3c = "specificationLevel" in self.capabilities
def _wrap_value(self, value):
if isinstance(value, dict):
......
......@@ -16,6 +16,7 @@
# under the License.
import hashlib
from numbers import Number
import os
import zipfile
try:
......@@ -54,6 +55,11 @@ class WebElement(object):
self._id = id_
self._w3c = w3c
def __repr__(self):
return '<{0.__module__}.{0.__name__} (session="{1}", element="{2}")>'.format(
type(self), self._parent.session_id, self._id)
@property
def tag_name(self):
"""This element's ``tagName`` property."""
......@@ -312,7 +318,7 @@ class WebElement(object):
for val in value:
if isinstance(val, Keys):
typing.append(val)
elif isinstance(val, int):
elif isinstance(val, Number):
val = val.__str__()
for i in range(len(val)):
typing.append(val[i])
......
......@@ -55,6 +55,10 @@ class WebDriverWait(object):
exceptions.append(ignored_exceptions)
self._ignored_exceptions = tuple(exceptions)
def __repr__(self):
return '<{0.__module__}.{0.__name__} (session="{1}")>'.format(
type(self), self._driver.session_id)
def until(self, method, message=''):
"""Calls the method provided with the driver as an argument until the \
return value is not False."""
......
Metadata-Version: 1.1
Name: selenium
Version: 2.47.1
Version: 2.48.0
Summary: Python bindings for Selenium
Home-page: https://github.com/SeleniumHQ/selenium/
Author: UNKNOWN
......@@ -44,7 +44,7 @@ Description: ======================
pip install -U selenium
Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-2.47.tar.gz), unarchive it, and run::
Alternately, you can download the source distribution from `PyPI <http://pypi.python.org/pypi/selenium>`_ (e.g. selenium-2.48.tar.gz), unarchive it, and run::
python setup.py install
......@@ -115,11 +115,11 @@ Description: ======================
However, to use Selenium Webdriver Remote or the legacy Selenium API (Selenium-RC), you need to also run the Selenium server. The server requires a Java Runtime Environment (JRE).
Download the server separately, from: http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.0.jar
Download the server separately, from: http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.0.jar
Run the server from the command line::
java -jar selenium-server-standalone-2.47.0.jar
java -jar selenium-server-standalone-2.48.8.jar
Then run your Python client scripts.
......@@ -142,3 +142,4 @@ Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
......@@ -13,6 +13,7 @@ py/selenium/webdriver/blackberry/__init__.py
py/selenium/webdriver/blackberry/webdriver.py
py/selenium/webdriver/chrome/__init__.py
py/selenium/webdriver/chrome/options.py
py/selenium/webdriver/chrome/remote_connection.py
py/selenium/webdriver/chrome/service.py
py/selenium/webdriver/chrome/webdriver.py
py/selenium/webdriver/common/__init__.py
......
{"is_release": false, "git_version": "6abfa2f"}
\ No newline at end of file
{"is_release": false, "git_version": "b7b081a"}
\ No newline at end of file
......@@ -31,7 +31,7 @@ for scheme in INSTALL_SCHEMES.values():
setup_args = {
'cmdclass': {'install': install},
'name': 'selenium',
'version': "2.47.1",
'version': "2.48.0",
'description': 'Python bindings for Selenium',
'long_description': open(join(abspath(dirname(__file__)), "py", "README")).read(),
'url': 'https://github.com/SeleniumHQ/selenium/',
......@@ -47,7 +47,8 @@ setup_args = {
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3'],
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4'],
'package_dir': {
'selenium': 'py/selenium',
'selenium.common': 'py/selenium/common',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment