Пример #1
0
 def __init__(self):
     self.driver = SingleDriver()
     self._tab_css = 'select[id="tab-value"]'
     self._title_css = 'textarea[id="title"]'
     self._content_css = 'div[class="CodeMirror-scroll"]'
     self._submit_css = 'input[value="提交"]'
Пример #2
0
 def __init__(self):
     self.driver = SingleDriver()
Пример #3
0
from test_project.common.singdriver import SingleDriver
from test_project.common.utils import util_demo
from test_project.business.user import UserAction
from test_project.business.topics import TopicAction
from test_project.business.viewmanage import ViewManage
from test_project.business.usercenter import UserCenter
from test_project.pom.topic_page import TopicPage
import os, sys, pytest

userAction = UserAction()
topicAction = TopicAction()
viewManage = ViewManage()
driver = SingleDriver()
topicpage = TopicPage()
usercenter = UserCenter()
util = util_demo()


@pytest.fixture(scope='module', autouse=True)
def module():
    '''
    所有的操作依赖登录,所有的用例执行之前应该先登录
    :return:
    '''
    userAction.user_login('testuser1', '123456')
    yield
    driver.quit()


@pytest.fixture(scope='function', autouse=True)
def func():
Пример #4
0
 def __init__(self):
     #确保浏览器实例是有一个
     self.driver=SingleDriver()