TA的每日心情 | 郁闷 2016-3-14 16:13 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
如a.py中
def login(username,password):
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("http://192.168.1.25:8080/archive/app.jsp")
driver.maximize_window()
driver.find_element_by_id("username").clear()
driver.find_element_by_id("username").send_keys(username)
driver.find_element_by_id("password").clear()
driver.find_element_by_id("password").send_keys(password)
driver.find_element_by_class_name("submitbtn").click()
b.py中想用传参该如何写
from selenium import webdriver
import general
general.login("superadmin","000000")
这样写不对,请熟悉的朋友指教一下
|
|