信计2001 翟佳树 web自动化测试作业
信计2002李昊林
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
class TestCESHIREN():
def setup_method(self, method):
self.driver = webdriver.Chrome()
self.vars = {}
def teardown_method(self, method):
self.driver.quit()
def test_cESHIREN(self):
self.driver.get("https://ceshiren.com/")
time.sleep(3)
self.driver.set_window_size(1060, 816)
self.driver.find_element(By.CSS_SELECTOR, ".d-icon-search").click()
self.driver.find_element(By.ID, "search-term").click()
self.driver.find_element(By.ID, "search-term").send_keys("LHL")
time.sleep(3)
self.driver.find_element(By.CSS_SELECTOR, ".item:nth-child(1) .user-result").click()
210620215王长江数据2102
数据2102王佳贺