vchrome 0.1.13__py3-none-any.whl → 0.1.14__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.
vchrome/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = '0.1.13'
1
+ __version__ = '0.1.14'
2
2
  __author__ = 'v'
3
3
  # ----------------------------------------------------------------------------------------------------
4
4
  _allowed = {'Chrome'}
@@ -1094,9 +1094,12 @@ def cdp_client(hostname, port, debug=False, runtimeEnable=False, cfg={}):
1094
1094
  return self.f.cdp('DOM.getBoxModel', {'objectId': self.objectId})
1095
1095
  def __repr__(self):
1096
1096
  return '<DOM:[{}] [{}]>'.format(self.className, self.objectId)
1097
+ def focus(self):
1098
+ self.f.cdp('DOM.focus', {"objectId": self.objectId})
1097
1099
  def clear(self, delay_uptime=0.15, timegap=0.01, timeout=15):
1098
1100
  self.wait_show(timeout)
1099
- self.f.cdp('DOM.focus', {"objectId": self.objectId})
1101
+ self.focus()
1102
+ time.sleep(0.01)
1100
1103
  clear_ents = self.f.rootf.make_clear()
1101
1104
  for kdn in clear_ents[:2]: time.sleep(timegap); self.f.cdp('Input.dispatchKeyEvent', kdn)
1102
1105
  time.sleep(delay_uptime)
@@ -1104,7 +1107,8 @@ def cdp_client(hostname, port, debug=False, runtimeEnable=False, cfg={}):
1104
1107
  for delt in clear_ents[4:]: time.sleep(timegap); self.f.cdp('Input.dispatchKeyEvent', delt)
1105
1108
  def input(self, str, delay_time=0.02, delay_uptime=0.15, random_gap=0.01, timeout=15):
1106
1109
  self.wait_show(timeout)
1107
- self.f.cdp('DOM.focus', {"objectId": self.objectId})
1110
+ self.focus()
1111
+ time.sleep(0.01)
1108
1112
  for kdn, kup in self.f.rootf.make_input_events(str):
1109
1113
  if kdn == 'insertText':
1110
1114
  self.f.cdp('Input.insertText', {"text": kup})
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vchrome
3
- Version: 0.1.13
3
+ Version: 0.1.14
4
4
 
@@ -0,0 +1,6 @@
1
+ v/__init__.py,sha256=6ZddLaDcwLudHWmFr2utAcYhperXw9AYoItNPm8EZSM,65
2
+ vchrome/__init__.py,sha256=ilP-O_1VJktPcarXrqDLfYMI9kHf1cY4wTzHUJYvwKM,229185
3
+ vchrome-0.1.14.dist-info/METADATA,sha256=1dsU6dFgkByeXNfk42mG47dDKLrVRwfljdl3brdBJ6E,57
4
+ vchrome-0.1.14.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
5
+ vchrome-0.1.14.dist-info/top_level.txt,sha256=IYbkbnFb2FGoroYj_ZXIitmnJDgYBA29_HmK9BdEUkY,10
6
+ vchrome-0.1.14.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- v/__init__.py,sha256=6ZddLaDcwLudHWmFr2utAcYhperXw9AYoItNPm8EZSM,65
2
- vchrome/__init__.py,sha256=573YdmXm9CHnE0IXbGV8_OhzMX9CV1TQRHB1heDFkyk,229113
3
- vchrome-0.1.13.dist-info/METADATA,sha256=TK9eZNxl2LcjYmPO-VyjXuhw7xAFTom4XTDzgK1HxDo,57
4
- vchrome-0.1.13.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
5
- vchrome-0.1.13.dist-info/top_level.txt,sha256=IYbkbnFb2FGoroYj_ZXIitmnJDgYBA29_HmK9BdEUkY,10
6
- vchrome-0.1.13.dist-info/RECORD,,