MCPcopy Create free account
hub / github.com/a943512/PyAibote / StarLoadWait

Method StarLoadWait

PyAibote/WebBotModel/WebLoadWait.py:40–59  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

38 return response
39
40 def StarLoadWait(self, data):
41 response = self._Send(data)
42 start_time = time.time()
43 if 'false' in response or 'webdriver error' in response:
44 while time.time() - start_time < self.Implicit_Waiting:
45 try:
46 self.debug(rf"---- Cannot find element. Retrying.... No retry in {self.Implicit_Waiting}s {round(time.time() - start_time, 2)}s")
47 response = self._Send(data)
48 if 'false' not in response and 'webdriver error' not in response:
49 break
50 if "domain" in response or "path" in response or "secure" in response or "httpOnly" in response:
51 break
52 time.sleep(self.Implicit_Waiting_Frequency)
53 except Exception as e:
54 time.sleep(self.Implicit_Waiting_Frequency)
55 if self.Implicit_Waiting_Throwing:
56 if 'false' in response or 'webdriver error' in response:
57 self.request.close()
58 raise "Unable to find the specified element"
59 return response
60
61 def StartShowWait(self, Time: int, RotationTime: int, ThrowException: bool):
62 """

Callers 1

SendDataMethod · 0.45

Calls 2

_SendMethod · 0.95
debugMethod · 0.45

Tested by

no test coverage detected