예제 #1
0
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.common.keys import Keys
import sys, os
import time
from datetime import datetime
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
sys.path.append('../')
from config import *
from common import get_student_project_progress, handle_studentlink, get_student_project_string, setup_driver

driver = setup_driver('C:/Users/feng3245/AppData/Local/Google/Chrome/User Data')
try:
	driver.get("https://auth.udacity.com/sign-in")
	WebDriverWait(driver, 180).until(EC.presence_of_element_located((By.XPATH, '//div[contains(text(),"Sign in with Google")]')))
	
	login = driver.find_element_by_xpath('//div[contains(text(),"Sign in with Google")]')
	exclude = []
	with open('../excludes', 'r') as file:
		exclude = file.read().replace('\n', '').split('|')
	#temporarily not using it
	driver.execute_script("arguments[0].click();", login)
	#user = driver.find_element_by_xpath('//input[@type="email"]')
	#user.send_keys(Keys.NULL)
	#for c in '*****@*****.**':
	#	user.send_keys(c)
	#password = driver.find_element_by_xpath('//input[@type="password"]')
예제 #2
0
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.common.keys import Keys
import sys, os
import time
from datetime import datetime
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
sys.path.append('../')
from config import *
from common import get_student_project_progress, handle_studentlink, get_student_project_string, setup_driver, change_message

driver = setup_driver(fixIntroProfileLocation)
try:
	driver.get("https://auth.udacity.com/sign-in")
	WebDriverWait(driver, 180).until(EC.presence_of_element_located((By.XPATH, '//div[contains(text(),"Sign in with Google")]')))
	
	login = driver.find_element_by_xpath('//div[contains(text(),"Sign in with Google")]')
	studentlinksLastCheck = []
	with open('../studentLinksPrior', 'r') as file:
		studentlinksLastCheck = file.read().replace('\n', '').split('|')
	#temporarily not using it
	driver.execute_script("arguments[0].click();", login)
	#user = driver.find_element_by_xpath('//input[@type="email"]')
	#user.send_keys(Keys.NULL)
	#for c in '*****@*****.**':
	#	user.send_keys(c)
	#password = driver.find_element_by_xpath('//input[@type="password"]')
예제 #3
0
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.common.keys import Keys
import sys, os
import time
from datetime import datetime
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
sys.path.append('../')
from config import *
from common import get_student_project_progress, handle_studentlink, answering_machine, email_out, setup_driver

driver = setup_driver(answerMachineProfileLocation)

try:
    driver.get("https://auth.udacity.com/sign-in")
    time.sleep(10)
    WebDriverWait(driver, 50).until(
        EC.presence_of_element_located(
            (By.XPATH, '//div[contains(text(),"Sign in with Google")]')))

    login = driver.find_element_by_xpath(
        '//div[contains(text(),"Sign in with Google")]')
    exclude = []
    with open('../excludes', 'r') as file:
        exclude = file.read().replace('\n', '').split('|')
    #temporarily not using it
    driver.execute_script("arguments[0].click();", login)
예제 #4
0
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.common.keys import Keys
import sys, os
import time
from datetime import datetime
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
sys.path.append('../')
from config import *
from common import get_student_project_progress, handle_studentlink, get_student_project_string, setup_driver, schedule_call, is_mentee, clearBox
from selenium.webdriver.common.action_chains import ActionChains
import subprocess
driver = setup_driver(sys.argv[1])
try:
    driver.get("https://auth.udacity.com/sign-in")
    WebDriverWait(driver, 180).until(
        EC.presence_of_element_located(
            (By.XPATH, '//div[contains(text(),"Sign in with Google")]')))

    login = driver.find_element_by_xpath(
        '//div[contains(text(),"Sign in with Google")]')
    driver.execute_script("arguments[0].click();", login)
    time.sleep(5)
    driver.get("https://zoom.us/meeting/schedule")
    time.sleep(20)
    login = None
    if EC.presence_of_element_located(
        (By.XPATH, '//a[contains(text(),"Sign in with Google")]')):
예제 #5
0
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.common.keys import Keys
import sys, os
import time
from datetime import datetime, timedelta
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains
sys.path.append('../')
from config import *
from common import setup_driver, normalize_schedules
import json
driver = setup_driver(sys.argv[1], False)

try:
    driver.get(
        "https://mail.google.com/mail/u/0/?tab=rm&ogbl#search/label%3Acalendly"
    )
    time.sleep(20)
    driver.get(
        "https://mail.google.com/mail/u/0/?tab=rm&ogbl#search/label%3Acalendly"
    )
    WebDriverWait(driver, 360).until(
        EC.presence_of_element_located(
            (By.XPATH, '//span[contains(text(), "Hi ' + fullName +
             ', A new event has been scheduled.")]')))
    time.sleep(20)
    requesterInfo = {}
예제 #6
0
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.common.keys import Keys
import sys, os
import time
from datetime import datetime
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
sys.path.append('../')
from config import *
from common import get_student_project_progress, handle_studentlink, get_student_project_string, setup_driver

driver = setup_driver(updateAnswerProfileLocation, True)

try:
	exclude = []
	with open('../excludes', 'r') as file:
		exclude = file.read().replace('\n', '').split('|')
	with open('../StudentFailProjects', 'r') as file:
		failstudents = get_student_project_progress(file.read().replace('\n', ''))
	with open('../StudentsPassProjects', 'r') as file:
		successstudents = get_student_project_progress(file.read().replace('\n', ''))
	studentsinquestion = list(successstudents.keys())+list(failstudents.keys())
	if not studentsinquestion:
		driver.quit()
		sys.exit(0)
	studentsinquestion = [ ' '.join([s.split()[0], s.split()[1].title()[:1]]) if len(s.split()) >1 else s  for s in studentsinquestion]
	print(studentsinquestion)
예제 #7
0
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.common.keys import Keys
import sys, os
import time
from datetime import datetime, timedelta
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains
sys.path.append('../')
from config import *
from common import setup_driver

driver = setup_driver('C:/Users/AutoEmailCheck/User Data', False)

try:
    driver.get(
        "https://mail.google.com/mail/u/0/?tab=rm&ogbl#search/label%3Ayourmentee+is%3Aunread"
    )
    time.sleep(20)
    driver.get(
        "https://mail.google.com/mail/u/0/?tab=rm&ogbl#search/label%3Ayourmentee+is%3Aunread"
    )
    WebDriverWait(driver, 360).until(
        EC.presence_of_element_located(
            (By.XPATH, '//span[contains(@class, "y2")]')))
    menteePassProjects = []
    menteeFailProjects = []
    time.sleep(20)
예제 #8
0
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.common.keys import Keys
import sys, os
import time
from datetime import datetime
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
sys.path.append('../')
from config import *
from common import get_student_project_progress, handle_studentlink, get_student_project_string, setup_driver

driver = setup_driver(dailyAnswerProfileLocation)

try:
    driver.get("https://auth.udacity.com/sign-in")
    WebDriverWait(driver, 50).until(
        EC.presence_of_element_located(
            (By.XPATH, '//div[contains(text(),"Sign in with Google")]')))

    login = driver.find_element_by_xpath(
        '//div[contains(text(),"Sign in with Google")]')
    exclude = []
    with open('../excludes', 'r') as file:
        exclude = file.read().replace('\n', '').split('|')
    #temporarily not using it
    driver.execute_script("arguments[0].click();", login)
    #user = driver.find_element_by_xpath('//input[@type="email"]')