mangoautomation 1.0.37__py3-none-any.whl → 1.0.38__py3-none-any.whl

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.

Potentially problematic release.


This version of mangoautomation might be problematic. Click here for more details.

@@ -101,16 +101,15 @@ class AsyncWebNewBrowser:
101
101
  raise MangoAutomationError(*ERROR_MSG_0009, value=(self.web_path,))
102
102
 
103
103
  async def new_context(self) -> BrowserContext:
104
- args_dict = {
105
- 'no_viewport': True,
106
- }
107
-
108
- if self.web_recording and self.videos_path:
109
- args_dict['record_video_dir'] = self.videos_path
110
-
104
+ args_dict = {}
105
+ if self.web_is_default:
106
+ args_dict["viewport"] = {"width": 1600, "height": 1080}
111
107
  if self.web_h5:
112
- del args_dict['no_viewport']
113
108
  args_dict.update(self.playwright.devices[self.web_h5])
109
+ if not (self.web_is_default or self.web_h5):
110
+ args_dict["no_viewport"] = True
111
+ if self.web_recording and self.videos_path:
112
+ args_dict["record_video_dir"] = self.videos_path
114
113
  return await self.browser.new_context(**args_dict)
115
114
 
116
115
  async def new_page(self, context: BrowserContext) -> Page:
@@ -101,16 +101,15 @@ class SyncWebNewBrowser:
101
101
  raise MangoAutomationError(*ERROR_MSG_0009, value=(self.web_path,))
102
102
 
103
103
  def new_context(self) -> BrowserContext:
104
- args_dict = {
105
- 'no_viewport': True,
106
- }
107
-
108
- if self.web_recording and self.videos_path:
109
- args_dict['record_video_dir'] = self.videos_path
110
-
104
+ args_dict = {}
105
+ if self.web_is_default:
106
+ args_dict["viewport"] = {"width": 1600, "height": 1080}
111
107
  if self.web_h5:
112
- del args_dict['no_viewport']
113
108
  args_dict.update(self.playwright.devices[self.web_h5])
109
+ if not (self.web_is_default or self.web_h5):
110
+ args_dict["no_viewport"] = True
111
+ if self.web_recording and self.videos_path:
112
+ args_dict["record_video_dir"] = self.videos_path
114
113
  return self.browser.new_context(**args_dict)
115
114
 
116
115
  def new_page(self, context: BrowserContext) -> Page:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mangoautomation
3
- Version: 1.0.37
3
+ Version: 1.0.38
4
4
  Summary: 测试工具
5
5
  Home-page: https://gitee.com/mao-peng/testkit
6
6
  Author: 毛鹏
@@ -35,7 +35,7 @@ mangoautomation/uidrive/web/async_web/_browser.py,sha256=39YroURzagpq0HoEn1RZnNf
35
35
  mangoautomation/uidrive/web/async_web/_customization.py,sha256=uw6p9uLHLXglgSkH4qjDl1v0iGlaNjvf8LljRH5cAHU,347
36
36
  mangoautomation/uidrive/web/async_web/_element.py,sha256=btIkX2nlic17sgSbXtNZ8h5wD-rPyIK6TH5fH4WaoPk,9506
37
37
  mangoautomation/uidrive/web/async_web/_input_device.py,sha256=sMAMHb_8QyPx3pKci0gRDQc2O7h1OYMGyA7fCWl81iM,3288
38
- mangoautomation/uidrive/web/async_web/_new_browser.py,sha256=bru_zVQ5Z_FEvuX1h8yjwb2mfbip25hBOO_VAuTLqy4,5486
38
+ mangoautomation/uidrive/web/async_web/_new_browser.py,sha256=ilUBdsJ0S7EAYBq0D6UbYEpMhmuVghnq133oTpvraC0,5597
39
39
  mangoautomation/uidrive/web/async_web/_page.py,sha256=TCYf79qQdVBBTTNq2COZFJVcLCgg5Ksu9lMgmQPVInU,2147
40
40
  mangoautomation/uidrive/web/sync_web/__init__.py,sha256=wCYW7V-32Zpw7C8m6zLoxb8niLNopVVBvA-zJBS7e9M,8387
41
41
  mangoautomation/uidrive/web/sync_web/_assertion.py,sha256=zZ4_4WiBQFSRwAh0P0JANa5z-ozbNTh3bnUqcZBti9s,11424
@@ -43,13 +43,13 @@ mangoautomation/uidrive/web/sync_web/_browser.py,sha256=c7xHkIIFPawlzcVkGjwqeKfW
43
43
  mangoautomation/uidrive/web/sync_web/_customization.py,sha256=E_pfI8gKd0O6r4huJIvA6hoW-X9fSDVL4zEUqhHgxwE,355
44
44
  mangoautomation/uidrive/web/sync_web/_element.py,sha256=P5kSFkKyRP8a7qpKJZf_Lhp6Ik1jgHfIVB8Tgpl7kNw,9078
45
45
  mangoautomation/uidrive/web/sync_web/_input_device.py,sha256=8t6tJgMb4zgb4Sv02XP3gUU0ZVbApCs3WaILv8Fe1iY,3169
46
- mangoautomation/uidrive/web/sync_web/_new_browser.py,sha256=RO1e4fQoeBol3w8NIx_oxIfRkGvx3ZbPSARTwMwetVQ,5378
46
+ mangoautomation/uidrive/web/sync_web/_new_browser.py,sha256=SGt3P7hFrPWkBLVEgN8O1p2V39Zjack7u__hsW123SM,5489
47
47
  mangoautomation/uidrive/web/sync_web/_page.py,sha256=MNekcL7o5YXEloeuvi3YrpOZxGhEWfrq-5i4PbtTLFg,2027
48
48
  tests/__init__.py,sha256=UhCNFqiVjxdh4CXESNo4oE7qfjpYYVkeHbSE5-7LGDY,125
49
49
  tests/test_ui_and.py,sha256=4k0_3bx_k2KbZifeRWGK65sxtdiPUOjkNzZ5oxjrc18,672
50
50
  tests/test_ui_web.py,sha256=MFaUN8O5qKOMMgyk2eelhKZsYcSJm0Do6pCgsdBZEH4,2765
51
- mangoautomation-1.0.37.dist-info/LICENSE,sha256=03WP-mgFmo8ofRYDe1HVDQUEUKQZ2q6P6Q-2A4c-46A,1085
52
- mangoautomation-1.0.37.dist-info/METADATA,sha256=wfPtX4xdHRbypf_QMuXA-H32JzyJHxEVRgNuQaTGKsw,626
53
- mangoautomation-1.0.37.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
54
- mangoautomation-1.0.37.dist-info/top_level.txt,sha256=g-uCmjvEODG8WFbmwbGM0-G0zHntHv8ZsS0PQRaMGtE,22
55
- mangoautomation-1.0.37.dist-info/RECORD,,
51
+ mangoautomation-1.0.38.dist-info/LICENSE,sha256=03WP-mgFmo8ofRYDe1HVDQUEUKQZ2q6P6Q-2A4c-46A,1085
52
+ mangoautomation-1.0.38.dist-info/METADATA,sha256=HBGr5MG53pmGVHtCk9hdoJ65IUIbgP5nUNHnTMjHdPo,626
53
+ mangoautomation-1.0.38.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
54
+ mangoautomation-1.0.38.dist-info/top_level.txt,sha256=g-uCmjvEODG8WFbmwbGM0-G0zHntHv8ZsS0PQRaMGtE,22
55
+ mangoautomation-1.0.38.dist-info/RECORD,,