Click here to Skip to main content
15,886,761 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
url = "https://dashboard.heroku.com/new?button-url=https%3A%2F%2Fgithub.com%2Ftitaniumnetwork-dev%2Falloy&template=https%3A%2F%2Fgithub.com%2Ftitaniumnetwork-dev%2Falloy%2Ftree%2Fmaster" 

options = Options()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')

driver = webdriver.Chrome(service=Service(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()), options=options)
driver.get(url)


title = driver.title
email = "//input[@class='form-control']"
password = "//input[@class='form-control password']"
log_in = '//button[@class="btn btn-primary btn-lg btn-block"]'
later = "//button[@class='btn btn-link']"
wait = WebDriverWait(driver, 10)


def build():
     if title == 'Heroku | Login':

        account = input('Do You Have A Heroku Account (Y/N): ')

        if account == "Y" or account == "y":

            email_box = WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.XPATH, email)))
            email_address = input('What Is Your Email Address That Your Heroku Account Is Under: ')
            email_box.send_keys(email_address)

            password_box = wait.until(EC.visibility_of_element_located((By.XPATH, password)))
            user_password = input('Whats Your Heroku Account Password: ')
            password_box.send_keys(user_password)

            driver.find_element(By.XPATH, log_in).click()
            wait.until(EC.visibility_of_element_located((By.XPATH, log_in))).click()

            
            print(driver.title)

            time.sleep(10)

            print(driver.title)

after I run it it says the title is Heroku Verification page which I can't find that page any where to be able to grab the xpaths I need. (sorry if this doesn't make since I've only been coding for around 6 months and am dyslexic)

What I have tried:

I've been trying to find ways by searching the internet for the last 3 hours and have got nothing so came here.
Posted
Updated 15-Dec-21 20:07pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900