Im attempting to build bot in Selenium and python that logs into SoundCloud and from their performs a few other tasks. I have gotten selenium to click the login button, but from there im having trouble getting selenium to click the input field and enter text inside the subsequent Iframe for email, may someone offer me some advice please? :)
from tkinter import *
import random
import urllib.request
from bs4 import BeautifulSoup
from selenium import webdriver
import time
import requests
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.options import Options
driver = webdriver.Chrome(executable_path='/Users/quanahbennett/PycharmProjects/SeleniumTest/chromedriver')
url= "https://soundcloud.com/"
driver.get(url)
#time.sleep(30)
wait = WebDriverWait(driver, 30)
#link = driver.find_elements_by_link_text("Sign in")
#link[0].click()
#driver.execute_script("arguments[0].click();", link[0])
# Click on Sign-in
#SUCCESFUL LOGIN BUTTON PUSH
please = driver.find_element_by_css_selector('button.frontHero__loginButton')
please.click()
try:
driver.switch_to.frame(0)
try:
attempt = driver.find_element_by_id('sign_in_up_email')
attempt.send_keys('Email')
except:
print("This is where the problem is occuring")
except:
print("didnt succesfully transfer to iframe")
breakpoint()
#driver.quit()