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

阿里云社区领积分自动打卡Selenium IDE脚本

脚本

感觉打卡比较麻烦,要点开点按钮这种机械化的操作。
所以就自己整了个脚本:

{
  "id": "f9999777-9ad6-40e0-9435-4f105919c982",
  "version": "2.0",
  "name": "aliyun",
  "url": "https://developer.aliyun.com",
  "tests": [{
    "id": "2178d9f7-7b83-4f03-9261-3dc1243df112",
    "name": "aliyun_click",
    "commands": [{
      "id": "77870568-5bd0-4413-93d0-90a53cfd67ce",
      "comment": "",
      "command": "executeScript",
      "target": "return [\"弹性计算\",\"云原生\",\"云存储\",\"飞天洛神云网络\",\"数据库\",\"PolarDB开源\",\"大数据与机器学习\",\"ModelScope模型即服务\",\"云效DevOps\",\"龙蜥操作系统\"]",
      "targets": [],
      "value": "linkNames"
    }, {
      "id": "974aa7f8-2e7e-49c9-8f53-c45fbbb60129",
      "comment": "",
      "command": "executeScript",
      "target": "return 0",
      "targets": [],
      "value": "index"
    }, {
      "id": "925dbfbc-bfa7-4954-a5e3-223ac028600b",
      "comment": "",
      "command": "while",
      "target": "${index}<${linkNames}.length",
      "targets": [],
      "value": ""
    }, {
      "id": "3a563772-6b86-4264-bfbf-2260352b0da7",
      "comment": "",
      "command": "open",
      "target": "/explore",
      "targets": [],
      "value": ""
    }, {
      "id": "789d4a80-0fc1-40ef-82a6-ad106d2d0226",
      "comment": "",
      "command": "executeScript",
      "target": "return ${linkNames}[${index}]",
      "targets": [],
      "value": "linkName"
    }, {
      "id": "4997653f-febf-4ef8-ac38-90665de2ffad",
      "comment": "",
      "command": "click",
      "target": "linkText=${linkName}",
      "targets": [
        ["linkText=云原生", "linkText"],
        ["css=.community-list-item:nth-child(5) .community-list-item-top-name", "css:finder"],
        ["xpath=(//a[contains(text(),'云原生')])[3]", "xpath:link"]
      ],
      "value": "",
      "opensWindow": true,
      "windowHandleName": "win7022",
      "windowTimeout": 2000
    }, {
      "id": "995eac2f-3144-4ca7-8e87-e41f7839d2e1",
      "comment": "",
      "command": "selectWindow",
      "target": "handle=${win7022}",
      "targets": [],
      "value": ""
    }, {
      "id": "d931eac2-569b-42a2-9445-68984c080035",
      "comment": "",
      "command": "pause",
      "target": "1500",
      "targets": [],
      "value": ""
    }, {
      "id": "8c79adb4-b0ec-476c-b500-48a22c75681f",
      "comment": "",
      "command": "if",
      "target": "document.getElementsByClassName('unlogin').length>0",
      "targets": [],
      "value": ""
    }, {
      "id": "8c431d44-57cb-4045-9d7f-6f3391dde7a5",
      "comment": "",
      "command": "click",
      "target": "css=.unlogin",
      "targets": [
        ["css=.unlogin", "css:finder"],
        ["xpath=//div[@id='sign-box']/div/div[2]/div[5]", "xpath:idRelative"],
        ["xpath=//div[2]/div/div[2]/div[5]", "xpath:position"]
      ],
      "value": ""
    }, {
      "id": "2452c9ac-9ca9-4307-afb0-a4fe2ce277d6",
      "comment": "",
      "command": "pause",
      "target": "1000",
      "targets": [],
      "value": ""
    }, {
      "id": "89954508-2db9-4659-b8c8-c9ff453c31cf",
      "comment": "",
      "command": "end",
      "target": "",
      "targets": [],
      "value": ""
    }, {
      "id": "f13475ae-31c9-4c60-8ab1-b3f7d6bf982d",
      "comment": "",
      "command": "executeScript",
      "target": "return ${index}+1",
      "targets": [],
      "value": "index"
    }, {
      "id": "50a88dc5-c98f-46d5-80ab-ab7150d1ba95",
      "comment": "",
      "command": "end",
      "target": "",
      "targets": [],
      "value": ""
    }, {
      "id": "f7473ef9-cc2d-4efc-b2c9-ca31125ced97",
      "comment": "",
      "command": "close",
      "target": "",
      "targets": [],
      "value": ""
    }]
  }],
  "suites": [{
    "id": "e71cffe2-e171-4d3d-a00d-73b33f06222a",
    "name": "Default Suite",
    "persistSession": false,
    "parallel": false,
    "timeout": 300,
    "tests": ["2178d9f7-7b83-4f03-9261-3dc1243df112"]
  }],
  "urls": ["https://developer.aliyun.com/"],
  "plugins": []
}

使用方法

1、把上边的文本内容放到一个text中,并把该text的后缀改成.side
在这里插入图片描述

2、用Selenium IDE加载并点击运行。
在这里插入图片描述


http://www.kler.cn/news/307847.html

相关文章:

  • How to see if openAI (node js) createModeration response “flagged“ is true
  • 代码随想录算法训练营第五十八天 | 拓扑排序精讲-软件构建
  • Arduino IDE离线配置第三方库文件-ESP32开发板
  • 8.JMeter+Ant(基于工具的实现接口自动化,命令行方式)
  • 常见的限流算法
  • 【C/C++】程序的构建(编译)过程概述
  • 【C++】函数重载
  • Python使用pymysql返回字典类型的数据
  • yum本地源配置
  • 基于 SpringBoot 的车辆充电桩管理系统
  • 医药|基于springboot的医药管理系统设计与实现(附项目源码+论文+数据库)
  • JAVA算法数据结构第一节稀疏矩阵
  • ADB ROOT开启流程
  • C# AutoResetEvent ManualResetEvent Mutex 对比
  • 54.【C语言】 字符函数和字符串函数(strncpy,strncat,strncmp函数)
  • ip映射域名,一般用于mysql和redis的固定映射,方便快捷打包
  • python基本数据类型简记
  • vue3 组合式API defineEmits() 与 emits 组件选项
  • I²C通信协议
  • 基于SpringBoot的考研助手系统+LW参考示例
  • 模拟实现通用型排序
  • Rust练手项目,写个有趣的小工具定时从一言网获取一段有趣的话并推送通知
  • STM32—I2C
  • OpenAI o1真的那么强吗
  • 天地一体化物联网:挑战与机遇
  • 移动订货小程序哪个好 批发订货系统源码哪个好
  • 【Elasticsearch系列八】高阶使用
  • 您的计算机已被.lcrypt勒索病毒感染?恢复您的数据的方法在这里!
  • 春秋云境靶场之CVE-2022-29464
  • element-plus弹窗内分页表格保留勾选项