driver.get("https://data.oregon.gov/business/Active-Trademark-Registrations/ny3n-dx3v/explore")
create_view_button = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//button[contains(@class, 'forge-button--raised') and contains(text(), 'Create View')]")))
create_view_button.click()
title_button = WebDriverWait(driver, 15).until(EC.element_to_be_clickable((By.ID, 'input-text-view-name')))
title_button.click()
time.sleep(2)
title_button.send_keys(titles+" "+namsse1)
content23 = (f"{timein }{titlestw}\n\n{maindomain}\n\n{maindomain}\n\n\n{content}n\n\n{content1}n\n\n{content2}")
pyperclip.copy(content23)
button_element = driver.find_element(By.CLASS_NAME, 'save-button')
button_element.click()
hotoview = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.XPATH, "//button[contains(text(), 'Go to view manager')]")))
hotoview.click()
metadatabuuton = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.XPATH, "//button[contains(., 'Edit Metadata')]")))
metadatabuuton.click()
textarea = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "textarea[placeholder='Enter a description']")))
textarea.click()
textarea.send_keys(Keys.CONTROL, 'v')
rowlabel = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.ID, "Row label")))
rowlabel.click()
rowlabel.send_keys("person")
agencyname = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.ID, "Agency Name")))
agencyname.click()
agencyname.send_keys(namsse1)
ActionChains(driver).send_keys(Keys.TAB*2).send_keys(Keys.DOWN).perform()
time.sleep(2)
ActionChains(driver).send_keys(Keys.DOWN).send_keys(Keys.ENTER).perform()
time.sleep(2)
ActionChains(driver).send_keys(Keys.TAB).send_keys(Keys.DOWN).perform()
time.sleep(2)
ActionChains(driver).send_keys(Keys.DOWN).send_keys(Keys.ENTER).perform()
time.sleep(2)
ActionChains(driver).send_keys(Keys.TAB*3).send_keys(Keys.DOWN).perform()
time.sleep(2)
ActionChains(driver).send_keys(Keys.DOWN).send_keys(Keys.ENTER).perform()
savebuuton = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.XPATH, "//button[contains(., 'Save')]")))
savebuuton.click()
time.sleep(5)
publishbtton = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.CLASS_NAME, 'publish-button')))
publishbtton.click()
time.sleep(3)
contunebuuto = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.XPATH, "//button[contains(@class, 'btn-primary') and contains(., 'Continue')]")))
contunebuuto.click()
publicbutton = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.XPATH, "//button[contains(@class, 'btn-default') and contains(., 'Public')]")))
publicbutton.click()
publichbutton = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.XPATH, "//button[contains(@class, 'btn-primary') and contains(., 'Publish')]")))
publichbutton.click()
gotlink = WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.XPATH, "//a[contains(@class, 'btn-primary') and contains(., 'Go to Primer')]")))
gotlink.click()
time.sleep(5)