Example #1
0
    def on(self,url,username,password,rukou):
        xx = 1
        go = baibaoxiang.geturl(url)
        print("url是:",url)
        go.Sid("inphoneinput","用户名",username,"输入用户名","无法输入用户名")
        go.Sid("pasword","密码",password,"输入密码","无法输入密码")
        go.CTag_name_zidingyi("button","text","登录","登录","登录成功","登录失败")
        go.llq.maximize_window()
        shuxing="默认值"
        if rukou=="plus":
            print("进入管家plus商城版")
            go.Cxpath("/html/body/div[2]/ul/li[2]/div[1]/a", "plus商城版系统入口", "进入plus商城版", "无法进入plus商城版")
            shuxing = "进入系统"
            sum=1
        if rukou=="yunying":
            # if url == "http://test-sso.vdongchina.com":
            print("进入管家plus运营版")
            xx=2
            go.Cxpath("/html/body/div[2]/ul/li[3]/div[1]/a","plus运营系统入口","进入运营系统","无法进入运营系统")
            # if url == "http://sso.vdongchina.com":
                # go.llq.get("http://operationplus.vdongchina.com/index.html#/operationAssistant/autoReply")
        if rukou=="vchen":
            print("进入微尘4.0系统")
            go.Cxpath("/html/body/div[2]/ul/li[1]/div[1]/a", "微尘系统入口", "进入微尘系统", "无法进入微尘系统")
            shuxing = "进入系统"
            sum=0

        # print(shuxing)

        return go
Example #2
0
 def on(self,url,username,password):
     xx = 1
     go = baibaoxiang.geturl(url)
     print("url是:",url)
     go.Sid("login-username","用户名",username,"输入用户名","无法输入用户名")
     go.Sid("login-password","密码",password,"输入密码","无法输入密码")
     go.CTag_name_zidingyi("button","type","submit","登录按钮","登录成功","登录失败")
     go.llq.maximize_window()
     return go
Example #3
0
    def on(self):
        go = baibaoxiang.geturl(self.url)
        whu=self.admin
        go.Sid("login-username","用户名",whu["username"],"输入用户名","无法输入用户名")
        go.Sid("login-password","密码",whu["password"],"输入密码","无法输入密码")
        go.CTag_name_zidingyi("button","text","登 录","登录","登录成功","登录失败")
        go.llq.maximize_window()
        old_url=go.llq.current_url
        while old_url == go.llq.current_url :
            go.CText_partial_s_key("微动跑团", "微动跑团", "进入微动跑团", "进入微动跑团菜单报错")
            time.sleep(2)

        return go
Example #4
0
    def __init__(self, user="", username="", password=""):
        """
        微信登录脚本,填写微信公众号名称,或者输入用户名密码,即可进行UI自动登录操作——
        :param user: 填写公众号名称——
        :param username: 登录账号——
        :param password: 登录密码——
        """
        go = baibaoxiang.geturl("https://mp.weixin.qq.com/")

        if user != "":
            u = user["user"]
            p = user["password"]
        else:
            u = username
            p = password
        go.Sname("account", "用户名", u, "输入用户名", "无法输入用户名")
        go.Sname("password", "密码", p, "输入密码", "无法输入密码")
        go.CTag_name_zidingyi("a", "title", "点击登录", "登录按钮", "登录", "无法登录")
        go.llq.maximize_window()
Example #5
0
from baibaoxiang import baibaoxiang
url = "http://sso.vdongchina.com"
go = baibaoxiang.geturl(url)
import time

wchen_vdong = {
    "username": "******",
    "pasword": "1234567890",
}

ho = wchen_vdong
go.Sid("inphoneinput", "用户名", ho["username"], "输入用户名", "无法输入用户名")
go.Sid("pasword", "密码", ho["pasword"], "输入密码", "无法输入密码")
go.CTag_name_zidingyi("button", "text", "登录", "登录", "登录成功", "登录失败")
go.llq.maximize_window()

k_1 = 1
while k_1 == 1:

    i = 1
    a = 1
    for i in range(1, 10):
        try:
            span_t = go.llq.find_elements_by_tag_name("span")
            for x in span_t:
                if "选择小程序" in x.text:
                    a = 2
                    break
        except Exception as e:
            print(e)
Example #6
0
from baibaoxiang import baibaoxiang

go = baibaoxiang.geturl("https://open.weixin.qq.com/")

test_ceshi = {"username": "******", "password": "******"}
china = {"username": "******", "password": "******"}
china2 = {"username": "******", "password": "******"}
url1 = go.llq.current_url
go.llq.maximize_window()
ho = china
go.Cid("loginBarBt", "登录框", "打开登录框", "无法找到登录按钮")
go.STag_name_zidingyi("input", "placeholder", "请填写登录邮箱", ho["username"],
                      "用户名输入框", "ok", "no ok")
go.STag_name_zidingyi("input", "placeholder", "请填写密码", ho["password"],
                      "用户名输入框", "ok", "no ok")
url2 = go.llq.current_url
login = go.llq.find_elements_by_link_text("登录")

for ll in login:
    ll.click()
Example #7
0
from baibaoxiang import baibaoxiang
from selenium.webdriver import ActionChains
import time

go = baibaoxiang.geturl("https://www.qichacha.com/user_login?back=%2F")
go.llq.maximize_window()
go.Cid("normalLogin", "账号密码登录", 2, 3)
go.Sid("nameNormal", "用户名", "18803000357", 1, 2)
go.Sname("pwdNormal", "密码", "a111111", 1, 2)
tuo = go.llq.find_element_by_id("nc_1_n1z")
print("开始悬停")
l = ActionChains(go.llq)
l.move_to_element(tuo).perform()
print("开始拖拽")
try:
    l.click_and_hold(on_element=tuo).perform()
    time.sleep(0.15)
    l.move_to_element_with_offset(to_element=tuo, xoffset=400,
                                  yoffset=10).perform()
    time.sleep(1)
except:
    go.error()
go.CTag_name_zidingyi("button", "type", "submit", "登录按钮", 1, 2)

time.sleep(5)
go.llq.quit()
print("关闭浏览器")
'''
https://blog.csdn.net/qq_42196922/article/details/85337709
反反爬虫教程
'''