Skip to content

Instantly share code, notes, and snippets.

@sodastereo
Created May 12, 2020 19:17
Show Gist options
  • Save sodastereo/103acbc8e89c1328e25200f50b7193ad to your computer and use it in GitHub Desktop.
Save sodastereo/103acbc8e89c1328e25200f50b7193ad to your computer and use it in GitHub Desktop.
print("Clicking on the Event Name field")
eventsbutton = driver.find_element(By.XPATH,'.//*[@class="_42ft _4jy0 _3-90 _4jy4 _4jy1 selected _51sy"]').click()
time.sleep(2)
print("Adding event name information")
eventname= "Automated Coffee For All"
eventbutton = driver.find_element(By.XPATH,'.//*[@class="_1o0a _55r1 _1488 _58ak _3ct8"]').send_keys(eventname)
time.sleep(2)
print("Clicking on the Description field")
descriptionname = ("We are having an automation coffee blowout")
descriptionbutton = driver.find_element(By.XPATH,'.//*[@class="_f6a _5yk1"]').click()
# Click description field
time.sleep(2)
print("Clicking on the Description field")
descriptionname = ("We are having an automation coffee blowout")
descriptionbutton = driver.find_element(By.XPATH,'.//*[@class="_5rp7"]').click()
# Enter description info
time.sleep(2)
print("Entering Description information")
descriptionname = ("We are having an automation coffee blowout")
descriptionbutton = driver.find_element(By.XPATH,'.//*[@class="notranslate _5rpu"]').send_keys(descriptionname)
# Select Category dropdown
time.sleep(2)
print("Click on the Category dropdown")
categorydropdown = driver.find_element(By.XPATH,".//span[contains(text(), 'Select Category')]").click()
# Click on sub category dropdown
time.sleep(2)
print("Click on the Art Category from dropdown")
descriptionbutton = driver.find_element(By.XPATH,'.//*[@class="_54nh"]').click()
# Click on frequency dropdown
time.sleep(2)
print("Click on the Frequency dropdown")
descriptionbutton = driver.find_element(By.XPATH,'.//*[@class="_3r__ _2agf _4o_4 _4jy0 _4jy4 _517h _51sy _42ft _p"]').click()
# Click on frequency sub dropdown
time.sleep(2)
print("Click on the Occurs Weekly from dropdown")
frequencybutton = driver.find_element(By.XPATH,".//span[contains(text(), 'Occurs Once')]").click()
# Click on starts calendar
time.sleep(2)
print("Click on the Starts Calendar")
frequencyCalendar = driver.find_element(By.XPATH,'.//*[@class="_3smp"]').click()
time.sleep(2)
print("Click on the Start Date")
frequencyCalendarCalendarSelectDate = driver.find_element(By.XPATH,'.//*[@class="_5c66 _5hpx"]').click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment