Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 574684f

Browse files
committed
Add all W3C WebDriver exceptions
1 parent a94e33b commit 574684f

File tree

52 files changed

+487
-55
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+487
-55
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
16+
namespace Facebook\WebDriver\Exception;
17+
18+
/**
19+
* The Element Click command could not be completed because the element receiving the events is obscuring the element
20+
* that was requested clicked.
21+
*/
22+
class ElementClickInterceptedException extends WebDriverException
23+
{
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
16+
namespace Facebook\WebDriver\Exception;
17+
18+
/**
19+
* A command could not be completed because the element is not pointer- or keyboard interactable.
20+
*/
21+
class ElementNotInteractableException extends WebDriverException
22+
{
23+
}

lib/Exception/ElementNotSelectableException.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18-
class ElementNotSelectableException extends WebDriverException
18+
/**
19+
* @deprecated Use Facebook\WebDriver\Exception\ElementNotInteractableException
20+
*/
21+
class ElementNotSelectableException extends ElementNotInteractableException
1922
{
2023
}

lib/Exception/ElementNotVisibleException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class ElementNotVisibleException extends WebDriverException
1922
{
2023
}

lib/Exception/ExpectedException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class ExpectedException extends WebDriverException
1922
{
2023
}

lib/Exception/IMEEngineActivationFailedException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class IMEEngineActivationFailedException extends WebDriverException
1922
{
2023
}

lib/Exception/IMENotAvailableException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class IMENotAvailableException extends WebDriverException
1922
{
2023
}

lib/Exception/IndexOutOfBoundsException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class IndexOutOfBoundsException extends WebDriverException
1922
{
2023
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
16+
namespace Facebook\WebDriver\Exception;
17+
18+
/**
19+
* Navigation caused the user agent to hit a certificate warning, which is usually the result of an expired
20+
* or invalid TLS certificate.
21+
*/
22+
class InsecureCertificateException extends WebDriverException
23+
{
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
16+
namespace Facebook\WebDriver\Exception;
17+
18+
/**
19+
* The arguments passed to a command are either invalid or malformed.
20+
*/
21+
class InvalidArgumentException extends WebDriverException
22+
{
23+
}

lib/Exception/InvalidCookieDomainException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* An illegal attempt was made to set a cookie under a different domain than the current page.
20+
*/
1821
class InvalidCookieDomainException extends WebDriverException
1922
{
2023
}

lib/Exception/InvalidCoordinatesException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class InvalidCoordinatesException extends WebDriverException
1922
{
2023
}

lib/Exception/InvalidElementStateException.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* A command could not be completed because the element is in an invalid state, e.g. attempting to clear an element
20+
* that isn’t both editable and resettable.
21+
*/
1822
class InvalidElementStateException extends WebDriverException
1923
{
2024
}

lib/Exception/InvalidSelectorException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* Argument was an invalid selector.
20+
*/
1821
class InvalidSelectorException extends WebDriverException
1922
{
2023
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
16+
namespace Facebook\WebDriver\Exception;
17+
18+
/**
19+
* Occurs if the given session id is not in the list of active sessions, meaning the session either does not exist
20+
* or that it’s not active.
21+
*/
22+
class InvalidSessionIdException extends WebDriverException
23+
{
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
16+
namespace Facebook\WebDriver\Exception;
17+
18+
/**
19+
* An error occurred while executing JavaScript supplied by the user.
20+
*/
21+
class JavascriptErrorException extends WebDriverException
22+
{
23+
}

lib/Exception/MoveTargetOutOfBoundsException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* The target for mouse interaction is not in the browser’s viewport and cannot be brought into that viewport.
20+
*/
1821
class MoveTargetOutOfBoundsException extends WebDriverException
1922
{
2023
}

lib/Exception/NoAlertOpenException.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18-
class NoAlertOpenException extends WebDriverException
18+
/**
19+
* @deprecated Use Facebook\WebDriver\Exception\NoSuchAlertException
20+
*/
21+
class NoAlertOpenException extends NoSuchAlertException
1922
{
2023
}

lib/Exception/NoCollectionException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class NoCollectionException extends WebDriverException
1922
{
2023
}

lib/Exception/NoScriptResultException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class NoScriptResultException extends WebDriverException
1922
{
2023
}

lib/Exception/NoStringException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class NoStringException extends WebDriverException
1922
{
2023
}

lib/Exception/NoStringLengthException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class NoStringLengthException extends WebDriverException
1922
{
2023
}

lib/Exception/NoStringWrapperException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class NoStringWrapperException extends WebDriverException
1922
{
2023
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
16+
namespace Facebook\WebDriver\Exception;
17+
18+
/**
19+
* An attempt was made to operate on a modal dialog when one was not open.
20+
*/
21+
class NoSuchAlertException extends WebDriverException
22+
{
23+
}

lib/Exception/NoSuchCollectionException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class NoSuchCollectionException extends WebDriverException
1922
{
2023
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
16+
namespace Facebook\WebDriver\Exception;
17+
18+
/**
19+
* No cookie matching the given path name was found amongst the associated cookies of the current browsing context’s
20+
* active document.
21+
*/
22+
class NoSuchCookieException extends WebDriverException
23+
{
24+
}

lib/Exception/NoSuchDocumentException.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18-
class NoSuchDocumentException extends WebDriverException
18+
/**
19+
* @deprecated Use Facebook\WebDriver\Exception\NoSuchWindowException
20+
*/
21+
class NoSuchDocumentException extends NoSuchWindowException
1922
{
2023
}

lib/Exception/NoSuchDriverException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace Facebook\WebDriver\Exception;
1717

18+
/**
19+
* @deprecated Removed in W3C WebDriver
20+
*/
1821
class NoSuchDriverException extends WebDriverException
1922
{
2023
}

0 commit comments

Comments
 (0)