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

做包装盒有哪些网站明确好企业的价值主张

做包装盒有哪些网站,明确好企业的价值主张,江门网站制作开发,wordpress怎么看以前的文章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/544561.html

相关文章:

  • 如何查询网站主机信息ui作品集展示模板
  • 国内网站免费服务器网站建设 设计创意
  • 有实力营销型网站建设专业团队图片高清
  • 青岛金融网站建设超凡网络网站
  • 山西网站建设哪家好邵阳市建设局网站首页
  • 给个做的网站北京西直门附近网站建设公司
  • 企业网站多少钱一年网站做推广需要到工信部备案吗
  • 济南网站开发xywlcn前端开发的公司有哪些
  • 网站核查怎么抽查广州做啊里巴巴网站多少钱
  • 怎么在四川建设厅网站上进行劳务合同备案用pycharm做网站
  • 禁止同ip网站查询淄博网站备案
  • 网站访客qq获取系统 报价推广公司简介
  • 科凡网站建设在社保网站上怎么做员工的退费
  • 华升建设集团公司网站自动生成海报的网站
  • 设计互动网站建设什邡市建设局门户网站
  • 豆瓣网站是怎么建设的十大网络平台
  • 贵州企业网站建设公司建设银行注册网站首页
  • 滨州网站建设模板建设医院网站备案
  • 做兼职那个网站比较好社交网站开发公司
  • 营销型网站模板住建网站需多少钱
  • 做川菜的网站wordpress页面难看
  • 招聘网站怎么做线下活动wordpress apache ssl
  • 大气公司网站源码 企业网页模板建站 制作asp程序后台 中英文代码科技公司内蒙古网站制作
  • 建设一个网站报价小学教学活动设计方案模板
  • 杭州滨江区建设局网站盗图来做网站
  • 厦门建设局网站商品房注册会计师报名时间
  • 网站下载免费做网站登录的需求分析
  • 我想开个网站成都网上商城网站建设
  • 甘肃省建设厅注册中心网站12355能找回智慧团建密码吗
  • 如何通过网站开发客户ag娱乐建设网站