Skip to content

Instantly share code, notes, and snippets.

@MCMXCIII
Created November 28, 2020 19:35
Show Gist options
  • Save MCMXCIII/af9ef6a43b30c604cdb070f0f2a03f3e to your computer and use it in GitHub Desktop.
Save MCMXCIII/af9ef6a43b30c604cdb070f0f2a03f3e to your computer and use it in GitHub Desktop.
# Generated by Selenium IDE
import pytest
import time
import json
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
class TestCLayton():
def setup_method(self, method):
self.driver = webdriver.Firefox()
self.vars = {}
def teardown_method(self, method):
self.driver.quit()
def test_cLayton(self):
# Test name: CLayton
# Step # | name | target | value
# 1 | open | / |
self.driver.get("https://www.georgiapublicnotice.com/")
# 2 | setWindowSize | 1295x695 |
self.driver.set_window_size(1295, 695)
# 3 | click | id=ctl00_ContentPlaceHolder1_as1_txtSearch |
self.driver.find_element(By.ID, "ctl00_ContentPlaceHolder1_as1_txtSearch").click()
# 4 | type | id=ctl00_ContentPlaceHolder1_as1_txtSearch | sale under power
self.driver.find_element(By.ID, "ctl00_ContentPlaceHolder1_as1_txtSearch").send_keys("sale under power")
# 5 | click | css=#ctl00_ContentPlaceHolder1_as1_divCounty a |
self.driver.find_element(By.CSS_SELECTOR, "#ctl00_ContentPlaceHolder1_as1_divCounty a").click()
# 6 | click | css=#ctl00_ContentPlaceHolder1_as1_lstCounty > li:nth-child(31) > label |
self.driver.find_element(By.CSS_SELECTOR, "#ctl00_ContentPlaceHolder1_as1_lstCounty > li:nth-child(31) > label").click()
# 7 | runScript | window.scrollTo(0,125.33333587646484) |
self.driver.execute_script("window.scrollTo(0,125.33333587646484)")
# 8 | click | css=#ctl00_ContentPlaceHolder1_as1_divDateRange > .header > a |
self.driver.find_element(By.CSS_SELECTOR, "#ctl00_ContentPlaceHolder1_as1_divDateRange > .header > a").click()
# 9 | click | id=ctl00_ContentPlaceHolder1_as1_rbLastNumWeeks |
self.driver.find_element(By.ID, "ctl00_ContentPlaceHolder1_as1_rbLastNumWeeks").click()
# 10 | click | id=ctl00_ContentPlaceHolder1_as1_txtLastNumWeeks |
self.driver.find_element(By.ID, "ctl00_ContentPlaceHolder1_as1_txtLastNumWeeks").click()
# 11 | type | id=ctl00_ContentPlaceHolder1_as1_txtLastNumWeeks | 2
self.driver.find_element(By.ID, "ctl00_ContentPlaceHolder1_as1_txtLastNumWeeks").send_keys("2")
# 12 | click | id=ctl00_ContentPlaceHolder1_as1_btnGo |
self.driver.find_element(By.ID, "ctl00_ContentPlaceHolder1_as1_btnGo").click()
// Clicking on the view button# 13 | click | id=ctl00_ContentPlaceHolder1_WSExtendedGridNP1_GridView1_ctl03_btnView |
self.driver.find_element(By.ID, "ctl00_ContentPlaceHolder1_WSExtendedGridNP1_GridView1_ctl03_btnView").click()
//Article should be on this page with the following selector
//#ctl00_ContentPlaceHolder1_PublicNoticeDetailsBody1_lblContentText
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment