from time import sleep
from selenium.webdriver.common.keys import Keys
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from data import *
class SteamBot:
def __init__(self):
self.username = username
self.password = password
self.driver = webdriver.Chrome(executable_path=r'C:\Users\XXX\PycharmProjects\pythonProject2\chromedriver.exe')
def log_into_steam(self):
driver = self.driver
driver.get(steam_link)
driver.implicitly_wait(5)
sleep(5)
login_input = driver.find_element_by_name("username").sendKeys("XXX")
def type_steam_guard_code(self):
if self.xpath_exists("//input[@id = 'twofactorcode_entry']"):
code = input("Type your Steam Guard code: ")
self.driver.find_element_by_xpath("//input[@id='twofactorcode_entry']").sendkeys(code)
sleep(1)
self.driver.find_element_by_css_selector("div[type=submit]").click()
sleep(3)
else:
sleep(3)
bot = SteamBot()
if __name__ == "__main__":
bot.log_into_steam()
def close_browser(self):
self.driver.close()
self.driver.quit()
Выдает вот такие вот ошибки:
Удалено модератором.
Как их исправить? Ошибки выдает тогда когда он должен вводить логин.