TA的每日心情 | 开心 2017-2-23 09:15 |
---|
签到天数: 13 天 连续签到: 1 天 [LV.3]测试连长
|
7#
楼主 |
发表于 2017-1-10 16:54:03
|
只看该作者
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class jfg(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
webdriver.FirefoxProfile=("E:\ECLIPSE\ROBOT\jfgou")
self.driver.maximize_window()
self.base_url = "https://test1.jfgou.com:8080/"
self.verificationErrors = []
self.accept_next_alert = True
def test_123(self):
driver = self.driver
driver.get(self.base_url + "/themes/index.html")
driver.find_element_by_id("username").clear()
driver.find_element_by_id("username").send_keys("admin")
driver.find_element_by_id("password").clear()
安装方法加了,好像也没用 |
|