{"id":64,"date":"2026-06-15T12:20:36","date_gmt":"2026-06-15T04:20:36","guid":{"rendered":"https:\/\/www.deartester.com\/?p=64"},"modified":"2026-06-15T12:20:36","modified_gmt":"2026-06-15T04:20:36","slug":"web%e8%87%aa%e5%8a%a8%e5%8c%96%e6%b5%8b%e8%af%95%e4%bb%8e%e5%85%a5%e9%97%a8%e5%88%b0%e5%ae%9e%e6%88%98%ef%bc%9a%e4%b8%80%e5%a5%97%e5%ae%8c%e6%95%b4%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"https:\/\/www.deartester.com\/index.php\/2026\/06\/15\/web%e8%87%aa%e5%8a%a8%e5%8c%96%e6%b5%8b%e8%af%95%e4%bb%8e%e5%85%a5%e9%97%a8%e5%88%b0%e5%ae%9e%e6%88%98%ef%bc%9a%e4%b8%80%e5%a5%97%e5%ae%8c%e6%95%b4%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88\/","title":{"rendered":"Web\u81ea\u52a8\u5316\u6d4b\u8bd5\u4ece\u5165\u95e8\u5230\u5b9e\u6218\uff1a\u4e00\u5957\u5b8c\u6574\u7684\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"<div class=\"wp-block-post-date\"><time datetime=\"2026-06-15T12:20:36+08:00\">2026\u5e746\u670815\u65e5<\/time><\/div>\n\n<div class=\"wp-block-post-author-name\">\u6d4b\u8bd5\u738b\u540c\u5b66<\/div>\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u662f\u4e0d\u662f\u4e5f\u9047\u5230\u8fc7\u8fd9\u4e9b\u573a\u666f\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6bcf\u5929\u91cd\u590d\u70b9\u51fb\u540c\u6837\u7684\u529f\u80fd\u70b9\uff0c\u70b9\u5230\u6000\u7591\u4eba\u751f\u3002\u7248\u672c\u4e0a\u7ebf\u524d\u901a\u5bb5\u56de\u5f52\uff0c\u51e0\u767e\u4e2a\u529f\u80fd\u70b9\u4e00\u4e2a\u4e00\u4e2a\u9a8c\u3002\u7ec8\u4e8e\u4e0b\u5b9a\u51b3\u5fc3\u505a\u81ea\u52a8\u5316\uff0c\u5199\u5b8c\u811a\u672c\u540e\u53d1\u73b0\u2014\u2014\u7ef4\u62a4\u6210\u672c\u6bd4\u624b\u5de5\u8fd8\u9ad8\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5927\u591a\u6570\u56e2\u961f\u81ea\u52a8\u5316\u5931\u8d25\uff0c\u4e0d\u662f\u56e0\u4e3a\u6280\u672f\u4e0d\u884c\uff0c\u800c\u662f\u65b9\u6cd5\u9519\u4e86\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u5929\u8fd9\u7bc7\u6587\u7ae0\uff0c\u4ece\u96f6\u5f00\u59cb\uff0c\u624b\u628a\u624b\u6559\u4f60\u642d\u5efa\u4e00\u5957<strong>\u53ef\u843d\u5730\u3001\u53ef\u7ef4\u62a4\u3001\u53ef\u6269\u5c55<\/strong>\u7684Web\u81ea\u52a8\u5316\u6d4b\u8bd5\u6846\u67b6\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u6280\u672f\u9009\u578b\uff1a\u4e3a\u4ec0\u4e48\u662f\u8fd9\u5957\u7ec4\u5408\uff1f<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Selenium<\/strong>\uff1aWeb\u81ea\u52a8\u5316\u9886\u57df\u7684\u4e8b\u5b9e\u6807\u51c6\uff0c\u652f\u6301\u6240\u6709\u4e3b\u6d41\u6d4f\u89c8\u5668\uff0c\u751f\u6001\u6700\u6210\u719f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pytest<\/strong>\uff1aPython\u6d4b\u8bd5\u6846\u67b6\u5929\u82b1\u677f\u3002\u8bed\u6cd5\u7b80\u6d01\u3001\u65ad\u8a00\u5f3a\u5927\u3001\u63d2\u4ef6\u4e30\u5bcc\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Allure<\/strong>\uff1a\u6d4b\u8bd5\u62a5\u544a\u4e0d\u4ec5\u597d\u770b\uff0c\u8fd8\u5305\u542b\u6b65\u9aa4\u3001\u622a\u56fe\u3001\u65e5\u5fd7\u3001\u8d8b\u52bf\u56fe\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u73af\u5883\u51c6\u5907\uff1a\u4e09\u6b65\u641e\u5b9a<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u7b2c\u4e00\u6b65\uff1a\u5b89\u88c5Python<\/strong><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">\u8bbf\u95ee python.org \u4e0b\u8f7d3.8\u4ee5\u4e0a\u7248\u672c\uff0c\u5b89\u88c5\u65f6\u8bb0\u5f97\u52fe\u9009&#8221;Add Python to PATH&#8221;\u3002<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>python --version<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u7b2c\u4e8c\u6b65\uff1a\u5b89\u88c5\u4f9d\u8d56<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir web_auto_test &amp;&amp; cd web_auto_test<br>python -m venv venv<br>venv\\Scripts\\activate &nbsp;# Windows<br>source venv\/bin\/activate &nbsp;# Mac\/Linux<br>pip install selenium pytest allure-pytest webdriver-manager<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u7b2c\u4e09\u6b65\uff1a\u9a8c\u8bc1\u73af\u5883<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>pip list<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u80fd\u770b\u5230 selenium\u3001pytest\u3001allure-pytest \u5c31\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u7b2c\u4e00\u4e2a\u81ea\u52a8\u5316\u7528\u4f8b\uff1a5\u5206\u949f\u4e0a\u624b<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u9700\u6c42<\/strong>\uff1a\u6253\u5f00\u767e\u5ea6 \u2192 \u641c\u7d22&#8221;Selenium\u81ea\u52a8\u5316\u6d4b\u8bd5&#8221; \u2192 \u9a8c\u8bc1\u641c\u7d22\u7ed3\u679c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from selenium import webdriver<br>from selenium.webdriver.chrome.service import Service<br>from selenium.webdriver.common.by import By<br>from webdriver_manager.chrome import ChromeDriverManager<br><br>def test_baidu_search():<br>&nbsp; &nbsp; # 1. \u542f\u52a8Chrome\u6d4f\u89c8\u5668<br>&nbsp; &nbsp; driver = webdriver.Chrome(<br>&nbsp; &nbsp; &nbsp; &nbsp; service=Service(ChromeDriverManager().install())<br>&nbsp; &nbsp; )<br><br>&nbsp; &nbsp; try:<br>&nbsp; &nbsp; &nbsp; &nbsp; # 2. \u6253\u5f00\u767e\u5ea6<br>&nbsp; &nbsp; &nbsp; &nbsp; driver.get(\"https:\/\/www.baidu.com\")<br>&nbsp; &nbsp; &nbsp; &nbsp; driver.maximize_window()<br><br>&nbsp; &nbsp; &nbsp; &nbsp; # 3. \u8f93\u5165\u641c\u7d22\u5173\u952e\u8bcd<br>&nbsp; &nbsp; &nbsp; &nbsp; search_box = driver.find_element(By.ID, \"kw\")<br>&nbsp; &nbsp; &nbsp; &nbsp; search_box.send_keys(\"Selenium\u81ea\u52a8\u5316\u6d4b\u8bd5\")<br><br>&nbsp; &nbsp; &nbsp; &nbsp; # 4. \u70b9\u51fb\u641c\u7d22\u6309\u94ae<br>&nbsp; &nbsp; &nbsp; &nbsp; driver.find_element(By.ID, \"su\").click()<br><br>&nbsp; &nbsp; &nbsp; &nbsp; # 5. \u9a8c\u8bc1\u7ed3\u679c<br>&nbsp; &nbsp; &nbsp; &nbsp; assert \"Selenium\" in driver.title, \"\u6807\u9898\u9a8c\u8bc1\u5931\u8d25\"<br>&nbsp; &nbsp; &nbsp; &nbsp; results = driver.find_elements(By.CSS_SELECTOR, \".result\")<br>&nbsp; &nbsp; &nbsp; &nbsp; assert len(results) &gt; 0, \"\u672a\u627e\u5230\u641c\u7d22\u7ed3\u679c\"<br><br>&nbsp; &nbsp; &nbsp; &nbsp; print(f\" \u6d4b\u8bd5\u901a\u8fc7\uff01\u627e\u5230 {len(results)} \u6761\u7ed3\u679c\")<br><br>&nbsp; &nbsp; finally:<br>&nbsp; &nbsp; &nbsp; &nbsp; driver.quit()<br><br>if __name__ == \"__main__\":<br>&nbsp; &nbsp; test_baidu_search()<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>pytest test_baidu_search.py -v<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001\u4f01\u4e1a\u7ea7\u9879\u76ee\u7ed3\u6784\uff1aPage Object\u6a21\u5f0f<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Page Object\u6a21\u5f0f\u7684\u6838\u5fc3\u601d\u60f3\uff1a<strong>\u628a\u9875\u9762\u5143\u7d20\u548c\u64cd\u4f5c\u5c01\u88c5\u6210\u7c7b\uff0c\u6d4b\u8bd5\u7528\u4f8b\u53ea\u5173\u5fc3\u4e1a\u52a1\u903b\u8f91\u3002<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u63a8\u8350\u9879\u76ee\u7ed3\u6784<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>web_auto_test\/<br>\u251c\u2500\u2500 config\/<br>\u2502 &nbsp; \u2514\u2500\u2500 config.py &nbsp; &nbsp; &nbsp; &nbsp; # \u73af\u5883\u914d\u7f6e<br>\u251c\u2500\u2500 pages\/<br>\u2502 &nbsp; \u251c\u2500\u2500 base_page.py &nbsp; &nbsp; &nbsp;# \u57fa\u7840\u9875\u9762\u7c7b<br>\u2502 &nbsp; \u2514\u2500\u2500 login_page.py &nbsp; &nbsp; # \u767b\u5f55\u9875\u9762<br>\u251c\u2500\u2500 tests\/<br>\u2502 &nbsp; \u251c\u2500\u2500 conftest.py &nbsp; &nbsp; &nbsp; # pytest\u914d\u7f6e<br>\u2502 &nbsp; \u2514\u2500\u2500 test_login.py &nbsp; &nbsp; # \u6d4b\u8bd5\u7528\u4f8b<br>\u251c\u2500\u2500 reports\/ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u6d4b\u8bd5\u62a5\u544a<br>\u2514\u2500\u2500 pytest.ini<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u57fa\u7840\u9875\u9762\u7c7b<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>from selenium.webdriver.support.ui import WebDriverWait<br>from selenium.webdriver.support import expected_conditions as EC<br><br>class BasePage:<br>&nbsp; &nbsp; \"\"\"\u6240\u6709\u9875\u9762\u5bf9\u8c61\u7684\u57fa\u7c7b\"\"\"<br><br>&nbsp; &nbsp; def __init__(self, driver):<br>&nbsp; &nbsp; &nbsp; &nbsp; self.driver = driver<br>&nbsp; &nbsp; &nbsp; &nbsp; self.timeout = 10<br><br>&nbsp; &nbsp; def find_element(self, locator):<br>&nbsp; &nbsp; &nbsp; &nbsp; return WebDriverWait(self.driver, self.timeout).until(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EC.presence_of_element_located(locator)<br>&nbsp; &nbsp; &nbsp; &nbsp; )<br><br>&nbsp; &nbsp; def click(self, locator):<br>&nbsp; &nbsp; &nbsp; &nbsp; self.find_element(locator).click()<br><br>&nbsp; &nbsp; def input_text(self, locator, text):<br>&nbsp; &nbsp; &nbsp; &nbsp; element = self.find_element(locator)<br>&nbsp; &nbsp; &nbsp; &nbsp; element.clear()<br>&nbsp; &nbsp; &nbsp; &nbsp; element.send_keys(text)<br><br>&nbsp; &nbsp; def is_visible(self, locator):<br>&nbsp; &nbsp; &nbsp; &nbsp; try:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WebDriverWait(self.driver, 5).until(<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EC.visibility_of_element_located(locator)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return True<br>&nbsp; &nbsp; &nbsp; &nbsp; except:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return False<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001\u5b9e\u6218\uff1a\u767b\u5f55\u81ea\u52a8\u5316\u6d4b\u8bd5<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u914d\u7f6e\u6587\u4ef6<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># config\/config.py<br>BASE_URL = \"https:\/\/your-test-site.com\"<br>USERNAME = \"test_user\"<br>PASSWORD = \"test_password\"<br>HEADLESS = False<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u767b\u5f55\u9875\u9762\u5bf9\u8c61<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>from selenium.webdriver.common.by import By<br>from pages.base_page import BasePage<br><br>class LoginPage(BasePage):<br>&nbsp; &nbsp; USERNAME_INPUT = (By.ID, \"username\")<br>&nbsp; &nbsp; PASSWORD_INPUT = (By.ID, \"password\")<br>&nbsp; &nbsp; LOGIN_BUTTON = (By.CSS_SELECTOR, \"button&#91;type='submit']\")<br>&nbsp; &nbsp; ERROR_MSG = (By.CLASS_NAME, \"error-msg\")<br><br>&nbsp; &nbsp; def open(self):<br>&nbsp; &nbsp; &nbsp; &nbsp; self.driver.get(BASE_URL + \"\/login\")<br>&nbsp; &nbsp; &nbsp; &nbsp; return self<br><br>&nbsp; &nbsp; def login(self, username, password):<br>&nbsp; &nbsp; &nbsp; &nbsp; self.input_text(self.USERNAME_INPUT, username)<br>&nbsp; &nbsp; &nbsp; &nbsp; self.input_text(self.PASSWORD_INPUT, password)<br>&nbsp; &nbsp; &nbsp; &nbsp; self.click(self.LOGIN_BUTTON)<br>&nbsp; &nbsp; &nbsp; &nbsp; return self<br><br>&nbsp; &nbsp; def get_error_message(self):<br>&nbsp; &nbsp; &nbsp; &nbsp; if self.is_visible(self.ERROR_MSG):<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return self.find_element(self.ERROR_MSG).text<br>&nbsp; &nbsp; &nbsp; &nbsp; return None<br><br>&nbsp; &nbsp; def is_login_success(self):<br>&nbsp; &nbsp; &nbsp; &nbsp; return \"dashboard\" in self.driver.current_url<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Pytest\u914d\u7f6e\u548cFixtures<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import pytest<br>from selenium import webdriver<br>from selenium.webdriver.chrome.service import Service<br>from webdriver_manager.chrome import ChromeDriverManager<br>from config.config import *<br><br>@pytest.fixture(scope=\"function\")<br>def driver():<br>&nbsp; &nbsp; options = webdriver.ChromeOptions()<br>&nbsp; &nbsp; if HEADLESS:<br>&nbsp; &nbsp; &nbsp; &nbsp; options.add_argument(\"--headless\")<br><br>&nbsp; &nbsp; driver = webdriver.Chrome(<br>&nbsp; &nbsp; &nbsp; &nbsp; service=Service(ChromeDriverManager().install()),<br>&nbsp; &nbsp; &nbsp; &nbsp; options=options<br>&nbsp; &nbsp; )<br>&nbsp; &nbsp; driver.maximize_window()<br>&nbsp; &nbsp; driver.implicitly_wait(5)<br><br>&nbsp; &nbsp; yield driver<br>&nbsp; &nbsp; driver.quit()<br><br>@pytest.fixture(scope=\"function\")<br>def login_page(driver):<br>&nbsp; &nbsp; from pages.login_page import LoginPage<br>&nbsp; &nbsp; return LoginPage(driver)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u767b\u5f55\u6d4b\u8bd5\u7528\u4f8b<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import pytest<br>import allure<br>from config.config import *<br><br>@allure.feature(\"\u767b\u5f55\u6a21\u5757\")<br>class TestLogin:<br><br>&nbsp; &nbsp; @allure.story(\"\u6b63\u5e38\u767b\u5f55\")<br>&nbsp; &nbsp; def test_login_success(self, login_page):<br>&nbsp; &nbsp; &nbsp; &nbsp; login_page.open()<br>&nbsp; &nbsp; &nbsp; &nbsp; login_page.login(USERNAME, PASSWORD)<br>&nbsp; &nbsp; &nbsp; &nbsp; assert login_page.is_login_success(), \"\u767b\u5f55\u5931\u8d25\"<br><br>&nbsp; &nbsp; @allure.story(\"\u5f02\u5e38\u767b\u5f55\")<br>&nbsp; &nbsp; @pytest.mark.parametrize(\"username,password,expected_error\", &#91;<br>&nbsp; &nbsp; &nbsp; &nbsp; (\"wrong_user\", PASSWORD, \"\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef\"),<br>&nbsp; &nbsp; &nbsp; &nbsp; (USERNAME, \"wrong_pass\", \"\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef\"),<br>&nbsp; &nbsp; &nbsp; &nbsp; (\"\", PASSWORD, \"\u8bf7\u8f93\u5165\u7528\u6237\u540d\"),<br>&nbsp; &nbsp; &nbsp; &nbsp; (USERNAME, \"\", \"\u8bf7\u8f93\u5165\u5bc6\u7801\"),<br>&nbsp; &nbsp; ])<br>&nbsp; &nbsp; def test_login_failed(self, login_page, username, password, expected_error):<br>&nbsp; &nbsp; &nbsp; &nbsp; login_page.open()<br>&nbsp; &nbsp; &nbsp; &nbsp; login_page.login(username, password)<br>&nbsp; &nbsp; &nbsp; &nbsp; error_msg = login_page.get_error_message()<br>&nbsp; &nbsp; &nbsp; &nbsp; assert expected_error in str(error_msg)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516d\u3001\u8fd0\u884c\u6d4b\u8bd5\u4e0e\u751f\u6210\u62a5\u544a<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># \u8fd0\u884c\u6240\u6709\u6d4b\u8bd5<br>pytest tests\/ -v --alluredir=reports\/allure-results<br><br># \u5931\u8d25\u91cd\u8bd5\u4e00\u6b21<br>pytest tests\/ -v --alluredir=reports\/allure-results --reruns 1<br><br># \u751f\u6210\u5e76\u6253\u5f00\u62a5\u544a<br>allure serve reports\/allure-results<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e03\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u89e3\u51b3\u65b9\u6848<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u95ee\u98981\uff1a\u5143\u7d20\u5b9a\u4f4d\u5931\u8d25<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># &nbsp;\u4e0d\u63a8\u8350\uff1a\u56fa\u5b9a\u7b49\u5f85<br>import time<br>time.sleep(3)<br><br># &nbsp;\u63a8\u8350\uff1a\u667a\u80fd\u7b49\u5f85<br>from selenium.webdriver.support.ui import WebDriverWait<br>element = WebDriverWait(driver, 10).until(<br>&nbsp; &nbsp; EC.presence_of_element_located((By.ID, \"username\"))<br>)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u95ee\u98982\uff1a\u52a8\u6001\u52a0\u8f7d\u5143\u7d20<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># \u7b49\u5f85loading\u6d88\u5931<br>WebDriverWait(driver, 10).until(<br>&nbsp; &nbsp; EC.invisibility_of_element_located((By.CLASS_NAME, \"loading\"))<br>)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u95ee\u98983\uff1a\u8de8\u6d4f\u89c8\u5668\u652f\u6301<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Chrome<br>driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))<br><br># Firefox<br>from webdriver_manager.firefox import GeckoDriverManager<br>driver = webdriver.Firefox(service=Service(GeckoDriverManager().install()))<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516b\u3001\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u7bc7\u6587\u7ae0\u6211\u4eec\u642d\u5efa\u4e86\u4e00\u5957\u5b8c\u6574\u7684Web\u81ea\u52a8\u5316\u6d4b\u8bd5\u6846\u67b6\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Selenium WebDriver<\/strong>\u00a0\u2014 \u6d4f\u89c8\u5668\u81ea\u52a8\u5316<\/li>\n\n\n\n<li><strong>Pytest<\/strong>\u00a0\u2014 \u6d4b\u8bd5\u7528\u4f8b\u7ba1\u7406<\/li>\n\n\n\n<li><strong>Allure<\/strong>\u00a0\u2014 \u53ef\u89c6\u5316\u62a5\u544a<\/li>\n\n\n\n<li><strong>Page Object\u6a21\u5f0f<\/strong>\u00a0\u2014 \u53ef\u7ef4\u62a4\u4ee3\u7801\u7ed3\u6784<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4e09\u4e2a\u6838\u5fc3\u539f\u5219<\/strong>\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u9009\u5bf9\u573a\u666f<\/strong>\u6bd4\u5199\u4ee3\u7801\u66f4\u91cd\u8981<\/li>\n\n\n\n<li><strong>\u67b6\u6784\u5148\u884c<\/strong>\uff0cPage Object\u8ba9\u4ee3\u7801\u66f4\u6613\u7ef4\u62a4<\/li>\n\n\n\n<li><strong>\u6301\u7eed\u96c6\u6210<\/strong>\uff0c\u8ba9\u81ea\u52a8\u5316\u771f\u6b63\u843d\u5730<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4f60\u5728\u81ea\u52a8\u5316\u6d4b\u8bd5\u4e2d\u9047\u5230\u8fc7\u54ea\u4e9b\u95ee\u9898\uff1f\u6b22\u8fce\u5728\u8bc4\u8bba\u533a\u4ea4\u6d41\uff01<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u662f\u4e0d\u662f\u4e5f\u9047\u5230\u8fc7\u8fd9\u4e9b\u573a\u666f\uff1f \u6bcf\u5929\u91cd\u590d\u70b9\u51fb\u540c\u6837\u7684\u529f\u80fd\u70b9\uff0c\u70b9\u5230\u6000\u7591\u4eba\u751f\u3002\u7248\u672c\u4e0a\u7ebf\u524d\u901a\u5bb5\u56de\u5f52\uff0c\u51e0\u767e\u4e2a\u529f\u80fd\u70b9\u4e00\u4e2a\u4e00\u4e2a\u9a8c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.deartester.com\/index.php\/2026\/06\/15\/web%e8%87%aa%e5%8a%a8%e5%8c%96%e6%b5%8b%e8%af%95%e4%bb%8e%e5%85%a5%e9%97%a8%e5%88%b0%e5%ae%9e%e6%88%98%ef%bc%9a%e4%b8%80%e5%a5%97%e5%ae%8c%e6%95%b4%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88\/\" class=\"more-link\">Read more<span class=\"screen-reader-text\"> &#8220;Web\u81ea\u52a8\u5316\u6d4b\u8bd5\u4ece\u5165\u95e8\u5230\u5b9e\u6218\uff1a\u4e00\u5957\u5b8c\u6574\u7684\u89e3\u51b3\u65b9\u6848&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-64","post","type-post","status-publish","format-standard","hentry","category-auto-tools"],"_links":{"self":[{"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/posts\/64","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/comments?post=64"}],"version-history":[{"count":1,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/posts\/64\/revisions"}],"predecessor-version":[{"id":65,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/posts\/64\/revisions\/65"}],"wp:attachment":[{"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/media?parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/categories?post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/tags?post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}