Skip to content

Commit 15924f1

Browse files
authored
Merge branch 'trunk' into py-bidi-chrome-webextensions
2 parents 9ee46c7 + 09a4b24 commit 15924f1

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

+216
-220
lines changed

common/mirror/selenium

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
[
22
{
3-
"tag_name": "selenium-4.33.0",
3+
"tag_name": "nightly",
44
"assets": [
55
{
6-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-dotnet-4.33.0.zip"
7-
},
8-
{
9-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-dotnet-strongnamed-4.33.0.zip"
10-
},
11-
{
12-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-java-4.33.0.zip"
6+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.34.0-SNAPSHOT.zip"
137
},
148
{
15-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-server-4.33.0.jar"
9+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.34.0-SNAPSHOT.jar"
1610
},
1711
{
18-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-server-4.33.0.zip"
12+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.34.0-SNAPSHOT.zip"
1913
}
2014
]
2115
},
2216
{
23-
"tag_name": "nightly",
17+
"tag_name": "selenium-4.33.0",
2418
"assets": [
2519
{
26-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.34.0-SNAPSHOT.zip"
20+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-dotnet-4.33.0.zip"
2721
},
2822
{
29-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.34.0-SNAPSHOT.jar"
23+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-dotnet-strongnamed-4.33.0.zip"
3024
},
3125
{
32-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.34.0-SNAPSHOT.zip"
26+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-java-4.33.0.zip"
27+
},
28+
{
29+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-server-4.33.0.jar"
30+
},
31+
{
32+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.33.0/selenium-server-4.33.0.zip"
3333
}
3434
]
3535
},

py/selenium/common/exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
# under the License.
1717
"""Exceptions that may happen in all the webdriver code."""
1818

19-
from typing import Optional, Sequence
19+
from collections.abc import Sequence
20+
from typing import Optional
2021

2122
SUPPORT_MSG = "For documentation on this error, please visit:"
2223
ERROR_URL = "https://www.selenium.dev/documentation/webdriver/troubleshooting/errors"

py/selenium/types.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
# under the License.
1717
"""Selenium type definitions."""
1818

19-
from typing import IO, Any, Iterable, Type, Union
19+
from collections.abc import Iterable
20+
from typing import IO, Any, Union
2021

2122
AnyKey = Union[str, int, float]
22-
WaitExcTypes = Iterable[Type[Exception]]
23+
WaitExcTypes = Iterable[type[Exception]]
2324

2425
# Service Types
2526
SubprocessStdAlias = Union[int, str, IO[Any]]

py/selenium/webdriver/chrome/service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
# under the License.
1717

1818

19-
from typing import List, Mapping, Optional
19+
from collections.abc import Mapping
20+
from typing import Optional
2021

2122
from selenium.types import SubprocessStdAlias
2223
from selenium.webdriver.chromium import service
@@ -37,7 +38,7 @@ def __init__(
3738
self,
3839
executable_path: Optional[str] = None,
3940
port: int = 0,
40-
service_args: Optional[List[str]] = None,
41+
service_args: Optional[list[str]] = None,
4142
log_output: Optional[SubprocessStdAlias] = None,
4243
env: Optional[Mapping[str, str]] = None,
4344
**kwargs,

py/selenium/webdriver/chromium/options.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import base64
1919
import os
20-
from typing import BinaryIO, Dict, List, Optional, Union
20+
from typing import BinaryIO, Optional, Union
2121

2222
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
2323
from selenium.webdriver.common.options import ArgOptions
@@ -29,9 +29,9 @@ class ChromiumOptions(ArgOptions):
2929
def __init__(self) -> None:
3030
super().__init__()
3131
self._binary_location: str = ""
32-
self._extension_files: List[str] = []
33-
self._extensions: List[str] = []
34-
self._experimental_options: Dict[str, Union[str, int, dict, List[str]]] = {}
32+
self._extension_files: list[str] = []
33+
self._extensions: list[str] = []
34+
self._experimental_options: dict[str, Union[str, int, dict, list[str]]] = {}
3535
self._debugger_address: Optional[str] = None
3636
self._enable_webextensions: bool = False
3737

@@ -69,7 +69,7 @@ def debugger_address(self, value: str) -> None:
6969
self._debugger_address = value
7070

7171
@property
72-
def extensions(self) -> List[str]:
72+
def extensions(self) -> list[str]:
7373
""":Returns: A list of encoded extensions that will be loaded."""
7474

7575
def _decode(file_data: BinaryIO) -> str:
@@ -118,7 +118,7 @@ def experimental_options(self) -> dict:
118118
""":Returns: A dictionary of experimental options for chromium."""
119119
return self._experimental_options
120120

121-
def add_experimental_option(self, name: str, value: Union[str, int, dict, List[str]]) -> None:
121+
def add_experimental_option(self, name: str, value: Union[str, int, dict, list[str]]) -> None:
122122
"""Adds an experimental option which is passed to chromium.
123123
124124
:Args:

py/selenium/webdriver/chromium/service.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
from collections.abc import Mapping
1718
from io import IOBase
18-
from typing import List, Mapping, Optional
19+
from typing import Optional
1920

2021
from selenium.types import SubprocessStdAlias
2122
from selenium.webdriver.common import service
@@ -37,7 +38,7 @@ def __init__(
3738
self,
3839
executable_path: Optional[str] = None,
3940
port: int = 0,
40-
service_args: Optional[List[str]] = None,
41+
service_args: Optional[list[str]] = None,
4142
log_output: Optional[SubprocessStdAlias] = None,
4243
env: Optional[Mapping[str, str]] = None,
4344
driver_path_env_key: Optional[str] = None,
@@ -63,5 +64,5 @@ def __init__(
6364
**kwargs,
6465
)
6566

66-
def command_line_args(self) -> List[str]:
67+
def command_line_args(self) -> list[str]:
6768
return [f"--port={self.port}"] + self.service_args

py/selenium/webdriver/common/actions/action_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
from typing import List, Optional, Union
18+
from typing import Optional, Union
1919

2020
from selenium.webdriver.remote.command import Command
2121

@@ -61,11 +61,11 @@ def get_device_with(self, name: str) -> Optional[Union["WheelInput", "PointerInp
6161
return next(filter(lambda x: x == name, self.devices), None)
6262

6363
@property
64-
def pointer_inputs(self) -> List[PointerInput]:
64+
def pointer_inputs(self) -> list[PointerInput]:
6565
return [device for device in self.devices if device.type == interaction.POINTER]
6666

6767
@property
68-
def key_inputs(self) -> List[KeyInput]:
68+
def key_inputs(self) -> list[KeyInput]:
6969
return [device for device in self.devices if device.type == interaction.KEY]
7070

7171
@property

py/selenium/webdriver/common/actions/input_device.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
# under the License.
1717

1818
import uuid
19-
from typing import Any, List, Optional
19+
from typing import Any, Optional
2020

2121

2222
class InputDevice:
2323
"""Describes the input device being used for the action."""
2424

2525
def __init__(self, name: Optional[str] = None):
2626
self.name = name or uuid.uuid4()
27-
self.actions: List[Any] = []
27+
self.actions: list[Any] = []
2828

2929
def add_action(self, action: Any) -> None:
3030
""""""

py/selenium/webdriver/common/actions/interaction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
from typing import Dict, Union
17+
from typing import Union
1818

1919
KEY = "key"
2020
POINTER = "pointer"
@@ -41,5 +41,5 @@ def __init__(self, source, duration: float = 0) -> None:
4141
super().__init__(source)
4242
self.duration = duration
4343

44-
def encode(self) -> Dict[str, Union[str, int]]:
44+
def encode(self) -> dict[str, Union[str, int]]:
4545
return {"type": self.PAUSE, "duration": int(self.duration * 1000)}

py/selenium/webdriver/common/actions/pointer_input.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
from typing import Any, Dict, Optional, Union
18+
from typing import Any, Optional, Union
1919

2020
from selenium.common.exceptions import InvalidArgumentException
2121
from selenium.webdriver.remote.webelement import WebElement
@@ -66,7 +66,7 @@ def create_pause(self, pause_duration: Union[int, float] = 0) -> None:
6666
def encode(self):
6767
return {"type": self.type, "parameters": {"pointerType": self.kind}, "id": self.name, "actions": self.actions}
6868

69-
def _convert_keys(self, actions: Dict[str, Any]):
69+
def _convert_keys(self, actions: dict[str, Any]):
7070
out = {}
7171
for k, v in actions.items():
7272
if v is None:

0 commit comments

Comments
 (0)