WebDriverExceptions.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. // Copyright 2004-present Facebook. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. final class WebDriverCurlException extends Exception {} // When curls fail
  16. abstract class WebDriverException extends Exception {
  17. private $results;
  18. public function __construct($message, $results = null) {
  19. parent::__construct($message);
  20. $this->results = $results;
  21. }
  22. public function getResults() {
  23. return $this->results;
  24. }
  25. }
  26. class IndexOutOfBoundsWebDriverError extends WebDriverException {} // 1
  27. class NoCollectionWebDriverError extends WebDriverException {} // 2
  28. class NoStringWebDriverError extends WebDriverException {} // 3
  29. class NoStringLengthWebDriverError extends WebDriverException {} // 4
  30. class NoStringWrapperWebDriverError extends WebDriverException {} // 5
  31. class NoSuchDriverWebDriverError extends WebDriverException {} // 6
  32. class NoSuchElementWebDriverError extends WebDriverException {} // 7
  33. class NoSuchFrameWebDriverError extends WebDriverException {} // 8
  34. class UnknownCommandWebDriverError extends WebDriverException {} // 9
  35. class ObsoleteElementWebDriverError extends WebDriverException {} // 10
  36. class ElementNotDisplayedWebDriverError extends WebDriverException {} // 11
  37. class InvalidElementStateWebDriverError extends WebDriverException {} // 12
  38. class UnhandledWebDriverError extends WebDriverException {} // 13
  39. class ExpectedWebDriverError extends WebDriverException {} // 14
  40. class ElementNotSelectableWebDriverError extends WebDriverException {} // 15
  41. class NoSuchDocumentWebDriverError extends WebDriverException {} // 16
  42. class UnexpectedJavascriptWebDriverError extends WebDriverException {} // 17
  43. class NoScriptResultWebDriverError extends WebDriverException {} // 18
  44. class XPathLookupWebDriverError extends WebDriverException {} // 19
  45. class NoSuchCollectionWebDriverError extends WebDriverException {} // 20
  46. class TimeOutWebDriverError extends WebDriverException {} // 21
  47. class NullPointerWebDriverError extends WebDriverException {} // 22
  48. class NoSuchWindowWebDriverError extends WebDriverException {} // 23
  49. class InvalidCookieDomainWebDriverError extends WebDriverException {} // 24
  50. class UnableToSetCookieWebDriverError extends WebDriverException {} // 25
  51. class UnexpectedAlertOpenWebDriverError extends WebDriverException {} // 26
  52. class NoAlertOpenWebDriverError extends WebDriverException {} // 27
  53. class ScriptTimeoutWebDriverError extends WebDriverException {} // 28
  54. class InvalidElementCoordinatesWebDriverError extends WebDriverException {}// 29
  55. class IMENotAvailableWebDriverError extends WebDriverException {} // 30
  56. class IMEEngineActivationFailedWebDriverError extends WebDriverException {}// 31
  57. class InvalidSelectorWebDriverError extends WebDriverException {} // 32