Title: [229279] releases/WebKitGTK/webkit-2.20/WebDriverTests
Revision
229279
Author
[email protected]
Date
2018-03-05 05:18:31 -0800 (Mon, 05 Mar 2018)

Log Message

Merge r229213 - Unreviewed. Update Selenium WebDriver imported tests.

* imported/selenium/importer.json:
* imported/selenium/py/selenium/__init__.py:
* imported/selenium/py/selenium/common/exceptions.py:
* imported/selenium/py/selenium/webdriver/__init__.py:
* imported/selenium/py/selenium/webdriver/remote/webelement.py:
* imported/selenium/py/selenium/webdriver/safari/webdriver.py:
* imported/selenium/py/test/selenium/webdriver/common/select_class_tests.py:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.20/WebDriverTests/ChangeLog (229278 => 229279)


--- releases/WebKitGTK/webkit-2.20/WebDriverTests/ChangeLog	2018-03-05 13:18:21 UTC (rev 229278)
+++ releases/WebKitGTK/webkit-2.20/WebDriverTests/ChangeLog	2018-03-05 13:18:31 UTC (rev 229279)
@@ -1,3 +1,15 @@
+2018-03-05  Carlos Garcia Campos  <[email protected]>
+
+        Unreviewed. Update Selenium WebDriver imported tests.
+
+        * imported/selenium/importer.json:
+        * imported/selenium/py/selenium/__init__.py:
+        * imported/selenium/py/selenium/common/exceptions.py:
+        * imported/selenium/py/selenium/webdriver/__init__.py:
+        * imported/selenium/py/selenium/webdriver/remote/webelement.py:
+        * imported/selenium/py/selenium/webdriver/safari/webdriver.py:
+        * imported/selenium/py/test/selenium/webdriver/common/select_class_tests.py:
+
 2018-03-01  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed gardening. Skip new action tests added in r229166.

Modified: releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/importer.json (229278 => 229279)


--- releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/importer.json	2018-03-05 13:18:21 UTC (rev 229278)
+++ releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/importer.json	2018-03-05 13:18:31 UTC (rev 229279)
@@ -1,6 +1,6 @@
 {
     "repository": "https://github.com/SeleniumHQ/selenium.git",
-    "revision": "63d571a2d64a8930c171fe94fc7b2e7e4eefde87",
+    "revision": "300cd3fa0288d3a88eb4b4c459c54bd02a015118",
     "paths_to_import": [
         "common",
         "py/conftest.py",

Modified: releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/__init__.py (229278 => 229279)


--- releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/__init__.py	2018-03-05 13:18:21 UTC (rev 229278)
+++ releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/__init__.py	2018-03-05 13:18:31 UTC (rev 229279)
@@ -16,4 +16,4 @@
 # under the License.
 
 
-__version__ = "3.9.0"
+__version__ = "3.10.0"

Modified: releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/common/exceptions.py (229278 => 229279)


--- releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/common/exceptions.py	2018-03-05 13:18:21 UTC (rev 229278)
+++ releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/common/exceptions.py	2018-03-05 13:18:31 UTC (rev 229279)
@@ -124,6 +124,9 @@
 
 class InvalidElementStateException(WebDriverException):
     """
+    Thrown when a command could not be completed because the element is in an invalid state.
+
+    This can be caused by attempting to clear an element that isn't both editable and resettable.
     """
     pass
 

Modified: releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/webdriver/__init__.py (229278 => 229279)


--- releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/webdriver/__init__.py	2018-03-05 13:18:21 UTC (rev 229278)
+++ releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/webdriver/__init__.py	2018-03-05 13:18:31 UTC (rev 229279)
@@ -24,4 +24,4 @@
 from .common.touch_actions import TouchActions  # noqa
 from .common.proxy import Proxy  # noqa
 
-__version__ = '3.8.1'
+__version__ = '3.9.0'

Modified: releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/webdriver/remote/webelement.py (229278 => 229279)


--- releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/webdriver/remote/webelement.py	2018-03-05 13:18:21 UTC (rev 229278)
+++ releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/webdriver/remote/webelement.py	2018-03-05 13:18:31 UTC (rev 229279)
@@ -628,6 +628,14 @@
         return self._parent.execute(command, params)
 
     def find_element(self, by=By.ID, value=None):
+        """
+        'Private' method used by the find_element_by_* methods.
+
+        :Usage:
+            Use the corresponding find_element_by_* instead of this.
+
+        :rtype: WebElement
+        """
         if self._w3c:
             if by == By.ID:
                 by = By.CSS_SELECTOR
@@ -645,6 +653,14 @@
                              {"using": by, "value": value})['value']
 
     def find_elements(self, by=By.ID, value=None):
+        """
+        'Private' method used by the find_elements_by_* methods.
+
+        :Usage:
+            Use the corresponding find_elements_by_* instead of this.
+
+        :rtype: list of WebElement
+        """
         if self._w3c:
             if by == By.ID:
                 by = By.CSS_SELECTOR

Modified: releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/webdriver/safari/webdriver.py (229278 => 229279)


--- releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/webdriver/safari/webdriver.py	2018-03-05 13:18:21 UTC (rev 229278)
+++ releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/selenium/webdriver/safari/webdriver.py	2018-03-05 13:18:31 UTC (rev 229279)
@@ -22,7 +22,6 @@
 
 from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
 from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
-from .service import Service
 
 
 class WebDriver(RemoteWebDriver):
@@ -31,21 +30,24 @@
 
     """
 
-    def __init__(self, port=0, executable_path="/usr/bin/safaridriver",
+    def __init__(self, port=0, executable_path="/usr/bin/safaridriver", reuse_service=False,
                  desired_capabilities=DesiredCapabilities.SAFARI, quiet=False):
         """
-        Creates a new instance of the Safari driver.
 
-        Starts the service and then creates new instance of Safari Driver.
+        Creates a new Safari driver instance and launches or finds a running safaridriver service.
 
         :Args:
-         - port - port you would like the service to run, if left as 0, a free port will be found.
+         - port - The port on which the safaridriver service should listen for new connections. If zero, a free port will be found.
+         - quiet - If True, the driver's stdout and stderr is suppressed.
+         - executable_path - Path to a custom safaridriver executable to be used. If absent, /usr/bin/safaridriver is used.
          - desired_capabilities: Dictionary object with desired capabilities (Can be used to provide various Safari switches).
-         - quiet - set to True to suppress stdout and stderr of the driver
+         - reuse_service - If True, do not spawn a safaridriver instance; instead, connect to an already-running service that was launched externally.
         """
-        self.service = Service(executable_path, port=port, quiet=quiet)
-        self.service.start()
 
+        self._reuse_service = reuse_service
+        if not reuse_service:
+            self.service.start()
+
         RemoteWebDriver.__init__(
             self,
             command_executor=self.service.service_url,
@@ -62,4 +64,5 @@
         except http_client.BadStatusLine:
             pass
         finally:
-            self.service.stop()
+            if not self._reuse_service:
+                self.service.stop()

Modified: releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/test/selenium/webdriver/common/select_class_tests.py (229278 => 229279)


--- releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/test/selenium/webdriver/common/select_class_tests.py	2018-03-05 13:18:21 UTC (rev 229278)
+++ releases/WebKitGTK/webkit-2.20/WebDriverTests/imported/selenium/py/test/selenium/webdriver/common/select_class_tests.py	2018-03-05 13:18:31 UTC (rev 229279)
@@ -45,13 +45,17 @@
 @pytest.mark.xfail_chrome
 @pytest.mark.xfail_firefox
 @pytest.mark.xfail_remote
[email protected]_marionette
[email protected]_safari
-def testSelectDisabledByIndexShouldThrowException(driver, pages):
[email protected]_marionette(reason='https://bugzilla.mozilla.org/show_bug.cgi?id=1429403')
+def testSelectDisabledByIndex(driver, pages):
     pages.load("formPage.html")
     sel = Select(driver.find_element(By.NAME, disabledSelect['name']))
-    with pytest.raises(ElementNotSelectableException):
+    if driver.w3c:
+        selected = sel.first_selected_option
         sel.select_by_index(1)
+        assert selected == sel.first_selected_option
+    else:
+        with pytest.raises(ElementNotSelectableException):
+            sel.select_by_index(1)
 
 
 def testSelectByValueSingle(driver, pages):
@@ -67,13 +71,17 @@
 @pytest.mark.xfail_chrome
 @pytest.mark.xfail_firefox
 @pytest.mark.xfail_remote
[email protected]_marionette
[email protected]_safari
-def testSelectDisabledByValueShouldThrowException(driver, pages):
[email protected]_marionette(reason='https://bugzilla.mozilla.org/show_bug.cgi?id=1429403')
+def testSelectDisabledByValue(driver, pages):
     pages.load("formPage.html")
     sel = Select(driver.find_element(By.NAME, disabledSelect['name']))
-    with pytest.raises(ElementNotSelectableException):
+    if driver.w3c:
+        selected = sel.first_selected_option
         sel.select_by_value('bar')
+        assert selected == sel.first_selected_option
+    else:
+        with pytest.raises(ElementNotSelectableException):
+            sel.select_by_value('bar')
 
 
 def testSelectByVisibleTextSingle(driver, pages):
@@ -103,13 +111,17 @@
 @pytest.mark.xfail_chrome
 @pytest.mark.xfail_firefox
 @pytest.mark.xfail_remote
[email protected]_marionette
[email protected]_safari
-def testSelectDisabledByVisibleTextShouldThrowException(driver, pages):
[email protected]_marionette(reason='https://bugzilla.mozilla.org/show_bug.cgi?id=1429403')
+def testSelectDisabledByVisibleText(driver, pages):
     pages.load("formPage.html")
     sel = Select(driver.find_element(By.NAME, disabledSelect['name']))
-    with pytest.raises(ElementNotSelectableException):
+    if driver.w3c:
+        selected = sel.first_selected_option
         sel.select_by_visible_text('Bar')
+        assert selected == sel.first_selected_option
+    else:
+        with pytest.raises(ElementNotSelectableException):
+            sel.select_by_visible_text('Bar')
 
 
 def testSelectByIndexMultiple(driver, pages):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to