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

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.8
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.8"
4
4
  description = "Setup Selenium for automation testing"
5
5
  authors = ["Marcel Wilson <trenchrats@gmail.com>"]
6
6
  license = "MIT"
@@ -15,6 +15,7 @@ classifiers = [
15
15
  "Programming Language :: Python :: 3.10",
16
16
  "Programming Language :: Python :: 3.11",
17
17
  "Programming Language :: Python :: 3.12",
18
+ "Programming Language :: Python :: 3.13",
18
19
  "Intended Audience :: Developers",
19
20
  "Natural Language :: English",
20
21
  ]
@@ -31,7 +32,7 @@ typing-extensions = "*"
31
32
  pytest = {version="*", optional = true}
32
33
  black = {version="*", optional = true}
33
34
  mypy = {version="*", optional = true}
34
- ruff = {version = ">=0.2.0", optional = true}
35
+ ruff = {version = ">=0.8.0", optional = true}
35
36
  tox = {version="*", optional = true}
36
37
 
37
38
  [tool.poetry.extras]
@@ -94,6 +95,7 @@ extend-exclude = [
94
95
  "README.md",
95
96
  ".idea",
96
97
  ]
98
+ output-format = "concise"
97
99
 
98
100
  [tool.ruff.lint]
99
101
  select = [
@@ -136,8 +138,6 @@ select = [
136
138
  # "FURB", # refurb # needs --preview flag to run
137
139
  ]
138
140
  ignore = [
139
- "ANN101", # missing-type-self
140
- "ANN102", # cls
141
141
  "E501", # line too long -- black will take care of this for us
142
142
  "SIM115", # use context handler for open -- situationally useful
143
143
  # "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: