zoukankan      html  css  js  c++  java
  • 脚本一

    #coding=utf-8
    from selenium import webdriver
    import time
    from selenium.webdriver.common.keys import Keys
    driver = webdriver.Firefox()
    driver.get('http://58.215.9.181/users/sign_in.html')
    #采购人登陆
    A = driver.find_element_by_id
    A('user_login').send_keys('******')
    A('user_password').send_keys('*******',Keys.ENTER)#登陆成功
    #点击后台管理
    time.sleep(2)
    driver.find_element_by_class_name('bue').click()
    driver.find_element_by_id('tree_9_span').click()
    driver.switch_to.frame("80")
    driver.find_element_by_link_text("新增发票").click()
    time.sleep(1)
    driver.find_element_by_id('invoice_type_1').click()
    driver.find_element_by_id('invoice_title').send_keys('ceshi')
    driver.find_element_by_id('invoice_num').send_keys('8888888888')
    driver.find_element_by_id('content_type_1').click()
    driver.find_element_by_id('moren_true').click()
    driver.find_element_by_class_name('btn-primary').click()
    print'新建发票成功'
  • 相关阅读:
    2015总结
    iOS逆向分析app
    Unknow Unknow
    mac配置nginx
    Mac后台开发MNMP(nginx , mysql, php)标配
    15.BOM
    12.内置对象
    13.面向对象与继承
    10.变量、作用域及内存
    11.基本包装类型
  • 原文地址:https://www.cnblogs.com/linguowei/p/7346965.html
Copyright © 2011-2022 走看看