예제 #1
0
class Test_ddt_case3(unittest.TestCase):
    def setUp(self):
        self.web_tools = SeleniumDriver(SeleniumDriver.Chrome)
        self.phone_edite = Phone_edite(self.web_tools)
        self.web_tools.open_url_is_true("https://www.imooc.com/", "慕课网")
        self.web_tools.handle_windows(SeleniumDriver.Max)

    @ddt.data(*data)
    def test_register_case(self, data):
        phone, passwrod, error_cod, assert_text = data
        rest = self.phone_edite.register_function(phone)
        self.assertEqual(len(rest), 37, "预期结果错误")

    def tearDown(self):
        self.web_tools.close()
예제 #2
0
 def setUp(self):
     self.web_tools = SeleniumDriver(SeleniumDriver.Chrome)
     self.phone_edite = Phone_edite(self.web_tools)
     self.web_tools.open_url_is_true("https://www.imooc.com/", "慕课网")
     self.web_tools.handle_windows(SeleniumDriver.Max)
예제 #3
0
#-*- coding: UTF-8 -*-
import time

from webdriver.SeleniumDriver import SeleniumDriver

url = "https://wetest.qq.com/"
atc_url = "https://atc.qq.com/"
task_name = ""

if __name__ == '__main__':

    driver = SeleniumDriver(SeleniumDriver.Chrome)
    driver.handle_windows(SeleniumDriver.Max)
    driver.open_url_is_true(atc_url, "WeTest")
    driver.click_element("tapd_login")
    time.sleep(3)
    driver.switch_web_index(3)
    driver.send_value("username", "t_jintang_ex")
    driver.send_value("password", "123@abAB")
    driver.click_element("submit")
예제 #4
0
 def setUp(self):
     self.web_tools = SeleniumDriver(SeleniumDriver.Chrome)
     self.mlgoin = MkLogin(self.web_tools)
     self.web_tools.open_url_is_true("https://www.imooc.com/","慕课网")
     self.web_tools.handle_windows(SeleniumDriver.Max)
예제 #5
0
# -*- coding: UTF-8 -*-
from webdriver.SeleniumDriver import SeleniumDriver



if __name__ == '__main__':
    webdrive = SeleniumDriver(SeleniumDriver.Chrome)
    webdrive.open_url_is_true("https://www.baidu.com/",'百度一下')
    webdrive.wait_element()