setup-selenium-testing 0.1.6__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: setup-selenium-testing
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Setup Selenium for automation testing
5
5
  Home-page: https://github.com/bandophahita/setup_selenium
6
6
  License: MIT
@@ -17,13 +17,14 @@ Classifier: Programming Language :: Python :: 3.9
17
17
  Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
20
21
  Classifier: Programming Language :: Python :: 3 :: Only
21
22
  Provides-Extra: dev
22
23
  Provides-Extra: test
23
24
  Requires-Dist: black ; extra == "dev"
24
25
  Requires-Dist: mypy ; extra == "dev"
25
26
  Requires-Dist: pytest ; extra == "dev" or extra == "test"
26
- Requires-Dist: ruff (>=0.2.0) ; extra == "dev"
27
+ Requires-Dist: ruff (>=0.8.0) ; extra == "dev"
27
28
  Requires-Dist: selenium (>=4.7.0)
28
29
  Requires-Dist: semantic-version
29
30
  Requires-Dist: tox ; extra == "dev" or extra == "test"
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "setup-selenium-testing"
3
- version = "0.1.6"
3
+ version = "0.1.7"
4
4
  description = "Setup Selenium for automation testing"
5
5
  authors = ["Marcel Wilson <trenchrats@gmail.com>"]
6
6
  license = "MIT"
@@ -31,7 +31,7 @@ typing-extensions = "*"
31
31
  pytest = {version="*", optional = true}
32
32
  black = {version="*", optional = true}
33
33
  mypy = {version="*", optional = true}
34
- ruff = {version = ">=0.2.0", optional = true}
34
+ ruff = {version = ">=0.8.0", optional = true}
35
35
  tox = {version="*", optional = true}
36
36
 
37
37
  [tool.poetry.extras]
@@ -94,6 +94,7 @@ extend-exclude = [
94
94
  "README.md",
95
95
  ".idea",
96
96
  ]
97
+ output-format = "concise"
97
98
 
98
99
  [tool.ruff.lint]
99
100
  select = [
@@ -136,8 +137,6 @@ select = [
136
137
  # "FURB", # refurb # needs --preview flag to run
137
138
  ]
138
139
  ignore = [
139
- "ANN101", # missing-type-self
140
- "ANN102", # cls
141
140
  "E501", # line too long -- black will take care of this for us
142
141
  "SIM115", # use context handler for open -- situationally useful
143
142
  # "SIM300", # yoda conditions -- meh
@@ -279,6 +279,9 @@ class SetupSelenium:
279
279
  options.set_preference("app.update.enabled", False)
280
280
  options.set_preference("network.prefetch-next", False)
281
281
  options.set_preference("network.dns.disablePrefetch", True)
282
+ options.set_preference(
283
+ "extensions.formautofill.addresses.capture.enabled", False
284
+ )
282
285
  return options
283
286
 
284
287
  @staticmethod
@@ -351,9 +354,11 @@ class SetupSelenium:
351
354
  # it's possible we no longer need to do these
352
355
  "--disable-gpu", # https://stackoverflow.com/q/51959986/2532408
353
356
  )
357
+ exp_prefs = {"autofill.profile_enabled": False}
354
358
  options = webdriver.ChromeOptions()
355
359
  for opt in opts:
356
360
  options.add_argument(opt)
361
+ options.add_experimental_option("prefs", exp_prefs)
357
362
  return options
358
363
 
359
364
  @staticmethod
@@ -484,9 +489,11 @@ class SetupSelenium:
484
489
  "--no-sandbox",
485
490
  "--disable-dev-shm-usage",
486
491
  )
492
+ exp_prefs = {"autofill.profile_enabled": False}
487
493
  options = webdriver.EdgeOptions()
488
494
  for opt in opts:
489
495
  options.add_argument(opt)
496
+ options.add_experimental_option("prefs", exp_prefs)
490
497
  return options
491
498
 
492
499
  @staticmethod
@@ -587,7 +594,7 @@ class SetupSelenium:
587
594
 
588
595
  def set_main_window_handle(self, window: str | None = None) -> str:
589
596
  """
590
- maintains the initial window handle as an attribute
597
+ Maintains the initial window handle as an attribute
591
598
 
592
599
  Most users will never utilize this. It's part of a legacy requirement for
593
600
  an old test suite
@@ -599,7 +606,7 @@ class SetupSelenium:
599
606
  except NoSuchWindowException:
600
607
  try:
601
608
  window = self.driver.window_handles[0]
602
- except WebDriverException: # noqa: TRY302
609
+ except WebDriverException: # noqa: TRY203
603
610
  # Have we closed all the windows?
604
611
  raise
605
612
  if window: