Skip to content

Commit db2796c

Browse files
authored
Merge branch 'trunk' into renovate/kotlin-monorepo
2 parents 3729158 + 791a6fb commit db2796c

File tree

8 files changed

+726
-415
lines changed

8 files changed

+726
-415
lines changed

Diff for: examples/javascript/package-lock.json

+565-87
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: examples/javascript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"selenium-webdriver": "4.27.0"
1212
},
1313
"devDependencies": {
14-
"mocha": "10.8.2"
14+
"mocha": "11.0.1"
1515
}
1616
}

Diff for: examples/kotlin/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<kotlin.version>2.1.0</kotlin.version>
1313

1414
<slf4j.version>2.0.16</slf4j.version>
15-
<logback.version>1.5.12</logback.version>
15+
<logback.version>1.5.14</logback.version>
1616

1717
<junit5.version>5.11.4</junit5.version>
1818
<wdm.version>5.2.3</wdm.version>

Diff for: examples/python/tests/browsers/test_internet_explorer.py

+74-6
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,82 @@ def test_basic_options_win11():
2323

2424
driver.quit()
2525

26+
@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows")
27+
def test_file_upload_timeout():
28+
options = webdriver.IeOptions()
29+
options.file_upload_timeout = 2000
30+
31+
driver = webdriver.Ie(options=options)
32+
33+
driver.quit()
34+
35+
36+
@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows")
37+
def test_ensure_clean_session():
38+
options = webdriver.IeOptions()
39+
options.ensure_clean_session = True
40+
41+
driver = webdriver.Ie(options=options)
42+
43+
driver.quit()
44+
45+
46+
@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows")
47+
def test_ignore_zoom_level():
48+
options = webdriver.IeOptions()
49+
options.ignore_zoom_level = True
50+
51+
driver = webdriver.Ie(options=options)
52+
53+
driver.quit()
54+
55+
56+
@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows")
57+
def test_ignore_protected_mode_settings():
58+
options = webdriver.IeOptions()
59+
options.ignore_protected_mode_settings = True
60+
61+
driver = webdriver.Ie(options=options)
62+
63+
driver.quit()
64+
65+
66+
@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows")
67+
def test_silent():
68+
service = webdriver.IeService(service_args=["--silent"])
69+
driver = webdriver.Ie(service=service)
70+
71+
driver.quit()
72+
73+
74+
@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows")
75+
def test_cmd_options():
76+
options = webdriver.IeOptions()
77+
options.add_argument("-private")
78+
79+
driver = webdriver.Ie(options=options)
80+
81+
driver.quit()
82+
83+
# Skipping this as it fails on Windows because the value of registry setting in
84+
# HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth must be '0'
85+
@pytest.mark.skip
86+
def test_force_create_process_api():
87+
options = webdriver.IeOptions()
88+
options.force_create_process_api = True
89+
90+
driver = webdriver.Ie(options=options)
91+
92+
driver.quit()
93+
2694

2795
@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows")
2896
def test_log_to_file(log_path):
29-
service = webdriver.IeService(log_output=log_path, log_level='INFO')
97+
service = webdriver.IeService(log_output=log_path, log_level="INFO")
3098

3199
driver = webdriver.Ie(service=service)
32100

33-
with open(log_path, 'r') as fp:
101+
with open(log_path, "r") as fp:
34102
assert "Starting WebDriver server" in fp.readline()
35103

36104
driver.quit()
@@ -50,19 +118,19 @@ def test_log_to_stdout(capfd):
50118

51119
@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows")
52120
def test_log_level(log_path):
53-
service = webdriver.IeService(log_output=log_path, log_level='WARN')
121+
service = webdriver.IeService(log_output=log_path, log_level="WARN")
54122

55123
driver = webdriver.Ie(service=service)
56124

57-
with open(log_path, 'r') as fp:
58-
assert 'Started InternetExplorerDriver server (32-bit)' in fp.readline()
125+
with open(log_path, "r") as fp:
126+
assert "Started InternetExplorerDriver server (32-bit)" in fp.readline()
59127

60128
driver.quit()
61129

62130

63131
@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows")
64132
def test_supporting_files(temp_dir):
65-
service = webdriver.IeService(service_args=["–extract-path="+temp_dir])
133+
service = webdriver.IeService(service_args=["–extract-path=" + temp_dir])
66134

67135
driver = webdriver.Ie(service=service)
68136

Diff for: website_and_docs/content/documentation/webdriver/browsers/internet_explorer.en.md

+22-79
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,8 @@ InternetExplorerOptions options = new InternetExplorerOptions();
9797
options.waitForUploadDialogUpTo(Duration.ofSeconds(2));
9898
WebDriver driver = new RemoteWebDriver(options);
9999
{{< /tab >}}
100-
{{< tab header="Python" >}}
101-
from selenium import webdriver
102-
103-
options = webdriver.IeOptions()
104-
options.file_upload_dialog_timeout = 2000
105-
driver = webdriver.Ie(options=options)
106-
107-
driver.get("http://www.google.com")
108-
109-
driver.quit()
100+
{{< tab header="Python" text=true >}}
101+
{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L28-L29" >}}
110102
{{< /tab >}}
111103
{{< tab header="CSharp" >}}
112104
var options = new InternetExplorerOptions();
@@ -150,16 +142,8 @@ InternetExplorerOptions options = new InternetExplorerOptions();
150142
options.destructivelyEnsureCleanSession();
151143
WebDriver driver = new RemoteWebDriver(options);
152144
{{< /tab >}}
153-
{{< tab header="Python" >}}
154-
from selenium import webdriver
155-
156-
options = webdriver.IeOptions()
157-
options.ensure_clean_session = True
158-
driver = webdriver.Ie(options=options)
159-
160-
driver.get("http://www.google.com")
161-
162-
driver.quit()
145+
{{< tab header="Python" text=true >}}
146+
{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L38-L39" >}}
163147
{{< /tab >}}
164148
{{< tab header="CSharp" >}}
165149
var options = new InternetExplorerOptions();
@@ -198,16 +182,8 @@ InternetExplorerOptions options = new InternetExplorerOptions();
198182
options.ignoreZoomSettings();
199183
WebDriver driver = new RemoteWebDriver(options);
200184
{{< /tab >}}
201-
{{< tab header="Python" >}}
202-
from selenium import webdriver
203-
204-
options = webdriver.IeOptions()
205-
options.ignore_zoom_level = True
206-
driver = webdriver.Ie(options=options)
207-
208-
driver.get("http://www.google.com")
209-
210-
driver.quit()
185+
{{< tab header="Python" text=true >}}
186+
{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L48-L49" >}}
211187
{{< /tab >}}
212188
{{< tab header="CSharp" >}}
213189
var options = new InternetExplorerOptions();
@@ -256,16 +232,8 @@ InternetExplorerOptions options = new InternetExplorerOptions();
256232
options.introduceFlakinessByIgnoringSecurityDomains();
257233
WebDriver driver = new RemoteWebDriver(options);
258234
{{< /tab >}}
259-
{{< tab header="Python" >}}
260-
from selenium import webdriver
261-
262-
options = webdriver.IeOptions()
263-
options.ignore_protected_mode_settings = True
264-
driver = webdriver.Ie(options=options)
265-
266-
driver.get("http://www.google.com")
267-
268-
driver.quit()
235+
{{< tab header="Python" text=true >}}
236+
{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L58-L59" >}}
269237
{{< /tab >}}
270238
{{< tab header="CSharp" >}}
271239
var options = new InternetExplorerOptions();
@@ -303,16 +271,8 @@ InternetExplorerOptions options = new InternetExplorerOptions();
303271
options.setCapability("silent", true);
304272
WebDriver driver = new InternetExplorerDriver(options);
305273
{{< /tab >}}
306-
{{< tab header="Python" >}}
307-
from selenium import webdriver
308-
309-
options = webdriver.IeOptions()
310-
options.set_capability("silent", True)
311-
driver = webdriver.Ie(options=options)
312-
313-
driver.get("http://www.google.com")
314-
315-
driver.quit()
274+
{{< tab header="Python" text=true >}}
275+
{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L68-L69" >}}
316276
{{< /tab >}}
317277
{{< tab header="CSharp" >}}
318278
InternetExplorerOptions options = new InternetExplorerOptions();
@@ -400,17 +360,8 @@ public class ieTest {
400360
}
401361
}
402362
{{< /tab >}}
403-
{{< tab header="Python" >}}
404-
from selenium import webdriver
405-
406-
options = webdriver.IeOptions()
407-
options.add_argument('-private')
408-
options.force_create_process_api = True
409-
driver = webdriver.Ie(options=options)
410-
411-
driver.get("http://www.google.com")
412-
413-
driver.quit()
363+
{{< tab header="Python" text=true >}}
364+
{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L76-L79" >}}
414365
{{< /tab >}}
415366
{{< tab header="CSharp" >}}
416367
using System;
@@ -495,16 +446,8 @@ public class ieTest {
495446
}
496447
}
497448
{{< /tab >}}
498-
{{< tab header="Python" >}}
499-
from selenium import webdriver
500-
501-
options = webdriver.IeOptions()
502-
options.force_create_process_api = True
503-
driver = webdriver.Ie(options=options)
504-
505-
driver.get("http://www.google.com")
506-
507-
driver.quit()
449+
{{< tab header="Python" text=true >}}
450+
{{< gh-codeblock path="/examples/python/tests/browsers/test_internet_explorer.py#L87-L90" >}}
508451
{{< /tab >}}
509452
{{< tab header="CSharp" >}}
510453
using System;
@@ -575,8 +518,8 @@ To change the logging output to save to a specific file:
575518
Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\
576519
Property value: String representing path to log file
577520
{{% /tab %}}
578-
{{< tab header="Python" >}}
579-
{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L29" >}}
521+
{{< tab header="Python" text=true >}}
522+
{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L97-L99" >}}
580523
{{< /tab >}}
581524
{{< tab header="CSharp" >}}
582525
{{< badge-implementation >}}
@@ -605,9 +548,9 @@ To change the logging output to display in the console as STDOUT:
605548
Property key: `InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY`\
606549
Property value: `DriverService.LOG_STDOUT` or `DriverService.LOG_STDERR`
607550
{{% /tab %}}
608-
{{< tab header="Python" >}}
551+
{{< tab header="Python" text=true >}}
609552
{{< badge-version version="4.11" >}}
610-
{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L41" >}}
553+
{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L109-L111" >}}
611554
{{< /tab >}}
612555
{{< tab header="CSharp" >}}
613556
{{< badge-implementation >}}
@@ -635,8 +578,8 @@ If logging output is specified, the default level is `FATAL`
635578
Property key: `InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY`\
636579
Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.toString()` enum
637580
{{% /tab %}}
638-
{{< tab header="Python" >}}
639-
{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L53" >}}
581+
{{< tab header="Python" text=true >}}
582+
{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L121-L123" >}}
640583
{{< /tab >}}
641584
{{< tab header="CSharp" >}}
642585
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L85" >}}
@@ -662,9 +605,9 @@ Property value: String representation of `InternetExplorerDriverLogLevel.DEBUG.t
662605
Property key: `InternetExplorerDriverService.IE_DRIVER_EXTRACT_PATH_PROPERTY`\
663606
Property value: String representing path to supporting files directory
664607
{{< /tab >}}
665-
{{< tab header="Python" >}}
608+
{{< tab header="Python" text=true >}}
666609
{{< badge-version version="4.11" >}}
667-
{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L65" >}}
610+
{{< gh-codeblock path="examples/python/tests/browsers/test_internet_explorer.py#L133-L135" >}}
668611
{{< /tab >}}
669612
{{< tab header="CSharp" >}}
670613
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Browsers/InternetExplorerTest.cs#L98" >}}

0 commit comments

Comments
 (0)