
Python
Python
from selenium import webdriver

Chrome
driver = webdriver.Chrome()
# 打开爱奇艺网站
driver.get("https://www.iqiyi.com/")
# 点击登录按钮
login_button = driver.find_element_by_xpath("//a[@title='登录']")
login_button.click()
# 在弹出的登录窗口中输入账号和密码并登录
# 点击用户头像
user_icon = driver.find_element_by_xpath("//span[@class='header-user']")
user_icon.click()
# 点击注销按钮
logout_button = driver.find_element_by_xpath("//a[@class='text-link-warning user-panel-logout']")
logout_button.click()
# 确认注销
confirm_button = driver.find_element_by_xpath("//button[@class='btn btn-primary']")
confirm_button.click()
# 关闭浏览器
driver.quit()
如果你使用其他的SDK语言,可以尝试使用对应语言的Selenium库或者其他的自动化测试工具来实现类似的操作。
Copyright © 2025 IZhiDa.com All Rights Reserved.
知答 版权所有 粤ICP备2023042255号