bcpkgfox 0.16.62__tar.gz → 0.16.64__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.

Potentially problematic release.


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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcpkgfox
3
- Version: 0.16.62
3
+ Version: 0.16.64
4
4
  Summary: Biblioteca BCFOX
5
5
  Home-page: https://github.com/robotsbcfox/PacotePythonBCFOX
6
6
  Author: Guilherme Neri
@@ -179,7 +179,7 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
179
179
  self.code_timeout = code_timeout
180
180
  self.driver = driver
181
181
 
182
- class tools(login_2fac):
182
+ class tool(login_2fac):
183
183
  def find_element_with_wait(self, by, value, timeout=10):
184
184
  global driver
185
185
  return WebDriverWait(
@@ -255,10 +255,9 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
255
255
  def codes_2_fac(self):
256
256
 
257
257
  self.extension_check()
258
- time.sleep(3)
259
258
 
260
259
  try:
261
- tools.find_element_with_wait(By.XPATH, '//input[@placeholder="Digite ou selecione um sistema pra acessar"]', timeout=10).send_keys(self.system)
260
+ tools.find_element_with_wait(By.XPATH, '//input[@placeholder="Digite ou selecione um sistema pra acessar"]', timeout=2).send_keys(self.system)
262
261
  code_insertion = True
263
262
 
264
263
  except:
@@ -268,7 +267,7 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
268
267
 
269
268
  try:
270
269
  tools.find_element_with_wait(By.XPATH, '//*[@id="root"]/div/div[1]/div//div//input', timeout=1).send_keys('eliezer@bcfox.com.br')
271
-
270
+ time.sleep(1)
272
271
  break
273
272
  except:
274
273
  self.driver.get('chrome-extension://lnidijeaekolpfeckelhkomndglcglhh/index.html')
@@ -395,10 +394,8 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
395
394
  else:
396
395
  break
397
396
 
398
- # Fecha todas as janelas, exceto a última
399
- for window in self.driver.window_handles[:-1]:
400
- self.driver.switch_to.window(window)
401
- self.driver.close()
397
+ self.driver.switch_to.window(self.driver.window_handles[0])
398
+ self.driver.close()
402
399
  self.driver.switch_to.window(self.driver.window_handles[-1])
403
400
 
404
401
  def extension_check(self):
@@ -411,6 +408,10 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
411
408
 
412
409
  except Exception as e:
413
410
 
411
+ if 'eliezer@bcfox.com.br' in self.driver.page_source:
412
+ tools.find_element_with_wait(By.XPATH, "//span[text()='alterar']").click()
413
+ return
414
+
414
415
  # Abrir uma nova aba
415
416
  self.driver.execute_script("window.open('');")
416
417
 
@@ -438,7 +439,7 @@ def login_2fac(driver, certificate, system, token, code_timeout=60):
438
439
 
439
440
  self.driver.get('chrome-extension://lnidijeaekolpfeckelhkomndglcglhh/index.html')
440
441
 
441
- tools = tools()
442
+ tools = tool()
442
443
  api = invokes_whoom()
443
444
  bot = whoom_codes()
444
445
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcpkgfox
3
- Version: 0.16.62
3
+ Version: 0.16.64
4
4
  Summary: Biblioteca BCFOX
5
5
  Home-page: https://github.com/robotsbcfox/PacotePythonBCFOX
6
6
  Author: Guilherme Neri
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="bcpkgfox",
5
- version="0.16.62",
5
+ version="0.16.64",
6
6
  author="Guilherme Neri",
7
7
  author_email="guilherme.neri@bcfox.com.br",
8
8
  description="Biblioteca BCFOX",
File without changes
File without changes
File without changes
File without changes