当前位置: 首页 > wzjs >正文

国外有没有做问卷调查的网站网站排行榜查询

国外有没有做问卷调查的网站,网站排行榜查询,四川网络营销推广,喀什seo排名Selenium 是一个开源的 Web 应用程序自动化测试框架,主要用于模拟用户操作浏览器,支持功能测试、兼容性测试及管理任务自动化。 1.下载浏览器驱动 google:右上角三个点>设置>关于Chrome>查看版本>下载对应的webdriver 下载地址&#xff1…

Selenium 是一个开源的 Web 应用程序自动化测试框架,主要用于模拟用户操作浏览器,支持功能测试、兼容性测试及管理任务自动化。

1.下载浏览器驱动

google:右上角三个点>设置>关于Chrome>查看版本>下载对应的webdriver

下载地址:Chrome for Testing availability

Edge:右上角三个点>设置>关于Microsoft Edge>查看版本>下载对应的webdriver

下载地址:Microsoft Edge WebDriver |Microsoft Edge 开发人员

2.示例代码

import timefrom selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeServiceservice = ChromeService(executable_path=r"chromedriver.exe")
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)try:driver.get('https://www.baidu.com/index.htm')time.sleep(5)
except Exception as e:print(e)
finally:driver.quit()

元素定位使用Xpath

find_element(By.XPATH, "xpath_expression")  # xpath_expression使用浏览器F12,复制

扩展应用:

配合F12使用

import time
import pyperclip
import pyautogui
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ECservice = ChromeService(executable_path=r"D:\desktop\se\driver\chromedriver.exe")
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)try:driver.get('https://www.baidu.com/index.htm')time.sleep(3)# pyautogui.press('F12')# Ctrl + [ / Ctrl + ]  切换开发者工具面板pyautogui.hotkey('ctrl', 'shift', 'c')   # 'ctrl', 'shift', 'c' :元素检查模式       'ctrl', 'shift', 'j' :控制台(Console)time.sleep(2)for _ in range(3):  # 切换到网络pyautogui.hotkey('ctrl', ']')## WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "kw")))driver.find_element(By.ID,'kw').send_keys('大熊猫\n')time.sleep(1)pyautogui.hotkey('ctrl', 'f')# 复制文本到剪贴板pyperclip.copy("nicon_10750f3.png")# 粘贴内容pyautogui.hotkey('ctrl', 'v')pyautogui.press('enter')time.sleep(60)
except Exception as e:print(e)
finally:driver.quit()

http://www.dtcms.com/wzjs/468884.html

相关文章:

  • 中央人民政府网官网北部湾大开发广州seo黑帽培训
  • 东营网站关键字优化最快的新闻发布平台
  • 企业网站自己可以做企业培训考试系统app
  • 会宁县建设局网站苏州网站建设优化
  • 企业网站建设方案文档seo如何提高排名
  • 用墨刀做网站后台原型四川企业seo
  • 马来西亚网站后缀东莞seo排名收费
  • 网站免费下载app河南网站排名
  • 经营性网站怎样备案营业推广方式
  • 宁波做网站哪里专业麒麟seo外推软件
  • 微信对接网站可以做301跳转吗百度网站的网址是什么
  • 恩施网站建设seo教学
  • wordpress上传插件青岛网站seo分析
  • 普通人开网店赚钱吗泰安seo推广
  • dedecms 英文网站如何让百度收录自己的网站信息
  • 交互设计和ui设计的区别seo网站推广优化就找微源优化
  • 园区建设网站的方案中国推广网站
  • 资兴做网站公司品牌宣传推广文案
  • 巩义网站推广怎么做app拉新佣金排行榜
  • 网页设计 网站建设 哪个好申京效率值联盟第一
  • 企业建设项目哪个网站可以查手机百度网盘登录入口
  • 如何建设政府网站评估体系事件营销
  • JAVA网站301重定向怎么做成都seo顾问
  • 微信网页版官网登录怎样优化网络
  • 外贸网站建设步骤网站怎么制作免费的
  • 131美女做爰网站企业seo职位
  • 做公司网站客户群体怎么找优化推荐
  • 鞍山一般做一个网站需要多少钱成都网站搜索排名优化公司
  • 有什么软件做短视频网站好灰色词seo推广
  • 网站为什么做重定向淘宝排名查询工具