zoukankan      html  css  js  c++  java
  • 常用元素操作api之验证码处理(十一)

    from selenium import webdriver
    import time
    # 验证码处理
    #1.去掉验证码
    #2.万能验证码
    #图片识别验证码
    #3.通过cookie处理
    # cookie处理
    # test01/newdream123
    driver= webdriver.Chrome()
    driver.get('http://47.107.178.45/zentao/www/index.php?m=user&f=login')
    driver.implicitly_wait(30)
    # driver.find_element_by_id('account').send_keys('test01')
    # driver.find_element_by_name('password').send_keys('newdream123')
    # driver.find_element_by_id('submit').click()
    # cookies = driver.get_cookies()
    # for cooki in cookies:
    # print(cooki)

    u = {
    u'domain': u'47.107.178.45',
    u'httpOnly': False,
    u'name': u'zentaosid',
    u'path': u'/',
    u'secure': False,
    u'value': u'tb3126saikccjmel5ko1mb3nu4'
    }
    driver.add_cookie(u)
    time.sleep(3)
    driver.refresh()
  • 相关阅读:
    Mac安装zookeeper
    征途
    vue-配置文件
    数组去重
    判断身份证
    判断邮箱
    判断手机号是否正确
    JS 时间格式转换
    打印 print-js
    自"愚"自乐的云服务器
  • 原文地址:https://www.cnblogs.com/tingting-yang/p/13335862.html
Copyright © 2011-2022 走看看