美文网首页
一平台计算机绘图评分

一平台计算机绘图评分

作者: Noza_ea8f | 来源:发表于2024-05-20 10:11 被阅读0次
from DrissionPage import ChromiumPage
from lib import user_info
import random
import time


def wait_key():
    while True:
        message = input('请输入“空格键”继续:')
        if message == ' ':
            break
        print('你输入的是 ' + message + '!')


# 用 DrissionPage 模式创建页面对象(默认模式)
page = ChromiumPage()

# 跳转到登录页面
url = 'https://iam.pt.ouchn.cn/am/UI/Login?realm=%2F&service=initService&goto=https%3A%2F%2Fiam.pt.ouchn.cn%2Fam%2Foauth2%2Fauthorize%3Fservice%3DinitService%26response_type%3Dcode%26client_id%3D345fcbaf076a4f8a%26scope%3Dall%26redirect_uri%3Dhttps%253A%252F%252Fmenhu.pt.ouchn.cn%252Fouchnapp%252Fwap%252Flogin%252Findex%26decision%3DAllow'

page.get(url)
# todo 登录
# 定位到账号文本框并输入账号
page.ele('#loginName').clear()
page.ele('#loginName').input(user_info.username)
# 定位到密码文本框并输入密码
page.ele('#password').clear()
page.ele('#password').input(user_info.password)
wait_key()


def start():
    page.wait.new_tab()  # 等待新tab打开也很爽
    page_x = page.get_tab(0)  # 取得新tab标签页
    time.sleep(5)

    try:
        # ele = page_x.ele('text:KB')
        ele = page_x.ele(
            'xpath://*[@id="give-score"]/div/div[2]/div[2]/div[1]/div[2]/div/div/div/div[2]/div/div[3]/span/a[3]/i')
        page_x.actions.move_to(ele).click()
        time.sleep(random.randint(10, 30))
        ele = page_x.ele('xpath://*[@id="give-score"]/div/div[2]/div[2]/div[2]/form/div/div[2]/div/input')
        page_x.actions.move_to(ele).click()
        ele.clear()
        ele.input(random.randint(97, 99))
        time.sleep(random.randint(30, 50))
        ele = page_x.ele('xpath://*[@id="give-score"]/div/div[2]/div[1]/div[2]/span[1]')
        page_x.actions.move_to(ele).click()

    except:
        try:
            # ele = page_x.ele('text:KB')
            ele = page_x.ele(
                'xpath://*[@id="give-score"]/div/div[2]/div[2]/div[1]/div[2]/div/div/div/div[2]/div/div[3]/span/a[2]/i')
            page_x.actions.move_to(ele).click()
            time.sleep(random.randint(10, 30))
            ele = page_x.ele('xpath://*[@id="give-score"]/div/div[2]/div[2]/div[2]/form/div/div[2]/div/input')
            page_x.actions.move_to(ele).click()
            ele.clear()
            ele.input(random.randint(97, 99))
            time.sleep(random.randint(30, 50))
            ele = page_x.ele('xpath://*[@id="give-score"]/div/div[2]/div[1]/div[2]/span[1]')
            page_x.actions.move_to(ele).click()
        except:
            # ele = page_x.ele('text:KB')
            ele = page_x.ele(
                'xpath://*[@id="give-score"]/div/div[2]/div[2]/div[1]/div[2]/div/div/div/div[2]/div/div[3]/span/a/i')
            page_x.actions.move_to(ele).click()
            time.sleep(random.randint(10, 30))
            ele = page_x.ele('xpath://*[@id="give-score"]/div/div[2]/div[2]/div[2]/form/div/div[2]/div/input')
            page_x.actions.move_to(ele).click()
            ele.clear()
            ele.input(random.randint(97, 99))
            time.sleep(random.randint(30, 50))
            ele = page_x.ele('xpath://*[@id="give-score"]/div/div[2]/div[1]/div[2]/span[1]')
            page_x.actions.move_to(ele).click()


# start(user_info.username, user_info.password)

while True:
    message = input('请输入“次数”继续:')
    if message == ' ':
        break
    for i in range(0, int(message)):
        start()
    print('你输入的是 ' + message + '!')

相关文章

  • CATIA介绍

    CATIA介绍: 如果说从图板绘图到二维计算机绘图只是绘图方式上的改变,那么,三维设计软件则在设计领域迈出了革命性...

  • ProcessOn绘图软件调研报告

    一、绘图软件行业分析 定义: 1)绘图工具:运用计算机进行绘制图形图示的工具; 2)图示:运用图形将事物描述出来,...

  • Gliffy调研报告

    一、绘图软件行业分析 定义: 1)绘图工具:运用计算机进行绘制图形图示的工具; 2)图示:运用图形将事物描述出来,...

  • Lucidchart调研报告

    一、绘图软件行业分析 定义: 1)绘图工具:运用计算机进行绘制图形图示的工具; 2)图示:运用图形将事物描述出来,...

  • 亿图图示调研报告

    一、绘图软件行业分析 定义: 1)绘图工具:运用计算机进行绘制图形图示的工具; 2)图示:运用图形将事物描述出来,...

  • Yed Graph Editor调研报告

    一、绘图软件行业分析 定义: 1)绘图工具:运用计算机进行绘制图形图示的工具; 2)图示:运用图形将事物描述出来,...

  • 阅读 012 - 用户体验要素

    分类:计算机、UI 设计 豆瓣评分:★★★★☆ 我的评分:★★★★☆ 这本《用户体验要素》是 Ajax 之父的经典...

  • 阅读 010 - 瞬间之美

    分类:计算机、网页制作 豆瓣评分:★★★★☆ 我的评分:★★★★☆ 《瞬间之美》是一本讲 Web 用户体验设计的书...

  • 景区 平台 最新评分

    查询数据 返回结果

  • 2018-09-11

    辰工石油勘探绘图平台软件V2.0 产品概述 辰工石油勘探绘图平台软件V2.0是公司主导产品之一,现已获得软件著作权...

网友评论

      本文标题:一平台计算机绘图评分

      本文链接:https://www.haomeiwen.com/subject/aqanfjtx.html