MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / __init__

Method __init__

py/selenium/webdriver/ie/webdriver.py:29–60  ·  view source on GitHub ↗

Creates a new instance of the Ie driver. Starts the service and then creates new instance of Ie driver. Args: options: Instance of Options. service: Service object for handling the browser driver if you need to pass extra details. keep_alive: Whe

(
        self,
        options: Options | None = None,
        service: Service | None = None,
        keep_alive: bool = True,
    )

Source from the content-addressed store, hash-verified

27 """Control the IEServerDriver and drive Internet Explorer."""
28
29 def __init__(
30 self,
31 options: Options | None = None,
32 service: Service | None = None,
33 keep_alive: bool = True,
34 ) -> None:
35 """Creates a new instance of the Ie driver.
36
37 Starts the service and then creates new instance of Ie driver.
38
39 Args:
40 options: Instance of Options.
41 service: Service object for handling the browser driver if you need to pass extra details.
42 keep_alive: Whether to configure RemoteConnection to use HTTP keep-alive.
43 """
44 self.service = service if service else Service()
45 self.options = options if options else Options()
46
47 self.service.path = self.service.env_path() or DriverFinder(self.service, self.options).get_driver_path()
48 self.service.start()
49
50 client_config = ClientConfig(remote_server_addr=self.service.service_url, keep_alive=keep_alive, timeout=120)
51 executor = RemoteConnection(
52 ignore_proxy=self.options._ignore_local_proxy,
53 client_config=client_config,
54 )
55
56 try:
57 super().__init__(command_executor=executor, options=self.options)
58 except Exception:
59 self.quit()
60 raise

Callers

nothing calls this directly

Calls 9

quitMethod · 0.95
ServiceClass · 0.90
OptionsClass · 0.90
DriverFinderClass · 0.90
ClientConfigClass · 0.90
RemoteConnectionClass · 0.90
get_driver_pathMethod · 0.80
startMethod · 0.65
env_pathMethod · 0.45

Tested by

no test coverage detected