mops 3.4.1__tar.gz → 3.4.2__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.
Files changed (54) hide show
  1. {mops-3.4.1 → mops-3.4.2}/PKG-INFO +1 -1
  2. {mops-3.4.1 → mops-3.4.2}/mops/__init__.py +1 -1
  3. {mops-3.4.1 → mops-3.4.2}/mops/base/driver_wrapper.py +3 -1
  4. {mops-3.4.1 → mops-3.4.2}/mops/mixins/internal_mixin.py +14 -4
  5. {mops-3.4.1 → mops-3.4.2}/mops.egg-info/PKG-INFO +1 -1
  6. {mops-3.4.1 → mops-3.4.2}/README.md +0 -0
  7. {mops-3.4.1 → mops-3.4.2}/mops/abstraction/driver_wrapper_abc.py +0 -0
  8. {mops-3.4.1 → mops-3.4.2}/mops/abstraction/element_abc.py +0 -0
  9. {mops-3.4.1 → mops-3.4.2}/mops/abstraction/mixin_abc.py +0 -0
  10. {mops-3.4.1 → mops-3.4.2}/mops/abstraction/page_abc.py +0 -0
  11. {mops-3.4.1 → mops-3.4.2}/mops/base/element.py +0 -0
  12. {mops-3.4.1 → mops-3.4.2}/mops/base/group.py +0 -0
  13. {mops-3.4.1 → mops-3.4.2}/mops/base/page.py +0 -0
  14. {mops-3.4.1 → mops-3.4.2}/mops/exceptions.py +0 -0
  15. {mops-3.4.1 → mops-3.4.2}/mops/js_scripts.py +0 -0
  16. {mops-3.4.1 → mops-3.4.2}/mops/keyboard_keys.py +0 -0
  17. {mops-3.4.1 → mops-3.4.2}/mops/mixins/capabilities.py +0 -0
  18. {mops-3.4.1 → mops-3.4.2}/mops/mixins/driver_mixin.py +0 -0
  19. {mops-3.4.1 → mops-3.4.2}/mops/mixins/native_context.py +0 -0
  20. {mops-3.4.1 → mops-3.4.2}/mops/mixins/objects/box.py +0 -0
  21. {mops-3.4.1 → mops-3.4.2}/mops/mixins/objects/driver.py +0 -0
  22. {mops-3.4.1 → mops-3.4.2}/mops/mixins/objects/location.py +0 -0
  23. {mops-3.4.1 → mops-3.4.2}/mops/mixins/objects/locator.py +0 -0
  24. {mops-3.4.1 → mops-3.4.2}/mops/mixins/objects/locator_type.py +0 -0
  25. {mops-3.4.1 → mops-3.4.2}/mops/mixins/objects/scrolls.py +0 -0
  26. {mops-3.4.1 → mops-3.4.2}/mops/mixins/objects/size.py +0 -0
  27. {mops-3.4.1 → mops-3.4.2}/mops/mixins/objects/visual_comaprison_mixin.py +0 -0
  28. {mops-3.4.1 → mops-3.4.2}/mops/mixins/objects/wait_result.py +0 -0
  29. {mops-3.4.1 → mops-3.4.2}/mops/playwright/play_driver.py +0 -0
  30. {mops-3.4.1 → mops-3.4.2}/mops/playwright/play_element.py +0 -0
  31. {mops-3.4.1 → mops-3.4.2}/mops/playwright/play_page.py +0 -0
  32. {mops-3.4.1 → mops-3.4.2}/mops/selenium/core/core_driver.py +0 -0
  33. {mops-3.4.1 → mops-3.4.2}/mops/selenium/core/core_element.py +0 -0
  34. {mops-3.4.1 → mops-3.4.2}/mops/selenium/core/core_page.py +0 -0
  35. {mops-3.4.1 → mops-3.4.2}/mops/selenium/driver/mobile_driver.py +0 -0
  36. {mops-3.4.1 → mops-3.4.2}/mops/selenium/driver/web_driver.py +0 -0
  37. {mops-3.4.1 → mops-3.4.2}/mops/selenium/elements/mobile_element.py +0 -0
  38. {mops-3.4.1 → mops-3.4.2}/mops/selenium/elements/web_element.py +0 -0
  39. {mops-3.4.1 → mops-3.4.2}/mops/selenium/pages/mobile_page.py +0 -0
  40. {mops-3.4.1 → mops-3.4.2}/mops/selenium/pages/web_page.py +0 -0
  41. {mops-3.4.1 → mops-3.4.2}/mops/selenium/sel_utils.py +0 -0
  42. {mops-3.4.1 → mops-3.4.2}/mops/shared_utils.py +0 -0
  43. {mops-3.4.1 → mops-3.4.2}/mops/utils/decorators.py +0 -0
  44. {mops-3.4.1 → mops-3.4.2}/mops/utils/internal_utils.py +0 -0
  45. {mops-3.4.1 → mops-3.4.2}/mops/utils/logs.py +0 -0
  46. {mops-3.4.1 → mops-3.4.2}/mops/utils/previous_object_driver.py +0 -0
  47. {mops-3.4.1 → mops-3.4.2}/mops/utils/selector_synchronizer.py +0 -0
  48. {mops-3.4.1 → mops-3.4.2}/mops/visual_comparison.py +0 -0
  49. {mops-3.4.1 → mops-3.4.2}/mops.egg-info/SOURCES.txt +0 -0
  50. {mops-3.4.1 → mops-3.4.2}/mops.egg-info/dependency_links.txt +0 -0
  51. {mops-3.4.1 → mops-3.4.2}/mops.egg-info/requires.txt +0 -0
  52. {mops-3.4.1 → mops-3.4.2}/mops.egg-info/top_level.txt +0 -0
  53. {mops-3.4.1 → mops-3.4.2}/pyproject.toml +0 -0
  54. {mops-3.4.1 → mops-3.4.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mops
3
- Version: 3.4.1
3
+ Version: 3.4.2
4
4
  Summary: Wrapper of Selenium, Appium and Playwright with single API
5
5
  Author-email: Podolian Vladimir <vladimir.podolyan64@gmail.com>
6
6
  License: MIT
@@ -1,2 +1,2 @@
1
- __version__ = '3.4.1'
1
+ __version__ = '3.4.2'
2
2
  __project_name__ = 'mops'
@@ -128,7 +128,9 @@ class DriverWrapper(InternalMixin, Logging, DriverWrapperABC):
128
128
  if cls.session.sessions_count() == 0:
129
129
  cls = super().__new__(cls)
130
130
  else:
131
- cls = super().__new__(type(f'ShadowDriverWrapper', (cls, ), get_attributes_from_object(cls))) # noqa
131
+ attrs = get_attributes_from_object(cls)
132
+ attrs.pop('_configured', None)
133
+ cls = super().__new__(type(f'ShadowDriverWrapper', (cls, ), attrs)) # noqa
132
134
 
133
135
  for name, _ in extract_named_objects(cls, bool).items():
134
136
  setattr(cls, name, False)
@@ -6,6 +6,7 @@ from typing import Any
6
6
  from mops.utils.internal_utils import (
7
7
  extract_named_objects,
8
8
  extract_all_named_objects,
9
+ is_driver_wrapper,
9
10
  )
10
11
 
11
12
 
@@ -49,6 +50,15 @@ class InternalMixin:
49
50
  if not hasattr(self, var):
50
51
  setattr(self, var, value)
51
52
 
53
+ def _get_protected_attrs(self: Any, current_obj_cls) -> set:
54
+ if not is_driver_wrapper(self):
55
+ return set(get_all_static_attributes(current_obj_cls))
56
+
57
+ if '_framework_attrs' not in current_obj_cls.__dict__:
58
+ current_obj_cls._framework_attrs = set(get_all_static_attributes(current_obj_cls))
59
+
60
+ return current_obj_cls.__dict__['_framework_attrs']
61
+
52
62
  def _set_static(self: Any, cls) -> None:
53
63
  """
54
64
  Set static from base cls (Web/Mobile/Play Element/Page etc.)
@@ -57,16 +67,16 @@ class InternalMixin:
57
67
  """
58
68
  current_obj_cls = self.__class__
59
69
 
60
- if current_obj_cls.__dict__.get('_configured'):
70
+ if current_obj_cls.__dict__.get('_configured') is cls:
61
71
  return
62
72
 
63
- existing_attrs = set(get_all_static_attributes(current_obj_cls))
73
+ protected = self._get_protected_attrs(current_obj_cls)
64
74
 
65
75
  for name, value in get_static_attributes(cls).items():
66
- if name not in existing_attrs:
76
+ if name not in protected:
67
77
  setattr(current_obj_cls, name, value)
68
78
 
69
- current_obj_cls._configured = True
79
+ current_obj_cls._configured = cls
70
80
 
71
81
  def _repr_builder(self: Any):
72
82
  class_name = self.__class__.__name__
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mops
3
- Version: 3.4.1
3
+ Version: 3.4.2
4
4
  Summary: Wrapper of Selenium, Appium and Playwright with single API
5
5
  Author-email: Podolian Vladimir <vladimir.podolyan64@gmail.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes