diff --git a/sites/target.py b/sites/target.py index 61748e6..2af75cd 100644 --- a/sites/target.py +++ b/sites/target.py @@ -107,7 +107,7 @@ def login(self): WebDriverWait(self.browser, 10).until(EC.presence_of_element_located((By.XPATH, '//input[@id="username"]'))) self.fill_and_authenticate() - + act_uname = WebDriverWait(self.browser, 10).until(EC.presence_of_element_located((By.XPATH, '//span[@data-test="accountUserName"]'))) time.sleep(1) if "sign in" in act_uname.text.lower(): @@ -127,13 +127,17 @@ def fill_and_authenticate(self): # slowly enters username and password with random waits between each character if self.browser.find_elements_by_id('username'): - for key in settings.target_user: - self.browser.find_element_by_xpath('//input[@id="username"]').send_keys(key) - time.sleep(random.uniform(0.5, 1.5)) + # for key in settings.target_user: + # self.browser.find_element_by_xpath('//input[@id="username"]').send_keys(key) + # time.sleep(random.uniform(0.5, 1.5)) + + self.browser.find_element_by_xpath('//input[@id="username"]').send_keys(settings.target_user) - for key in settings.target_pass: - self.browser.find_element_by_xpath('//input[@id="password"]').send_keys(key) - time.sleep(random.uniform(0.5, 1.5)) + # for key in settings.target_pass: + # self.browser.find_element_by_xpath('//input[@id="password"]').send_keys(key) + # time.sleep(random.uniform(0.5, 1.5)) + + self.browser.find_element_by_xpath('//input[@id="password"]').send_keys(settings.target_pass) loginBtn = wait(self.browser, self.TIMEOUT_LONG).until( EC.presence_of_element_located((By.XPATH,'//button[@id="login"]'))