无法调用selenium testcase

时间:2015-06-24 11:39:50

标签: python unit-testing selenium

#sample test case
class ABC(unittest.TestCase):

    def setUp(self):

        self.driver = webdriver.Firefox()
        self.driver.get("http://testxyz.com")
        ...
    #sample unit test
    def test_A(self):
        driver = self.driver
        a = "CREATE\nTOGGLE DROPDOWN"
        self.assertEquals(a, log)
        ....
        return driver

#sample test case class 2
class XYZ(unittest.TestCase):

    def setUp(self):

        self.driver = webdriver.Firefox()
        self.driver.get("http://testxyz.com")
        ...

    #sample test case function where I would be calling another testcase
    def test_B(self):
        a = ABC()
        a.test_A() #is it possible to call a test case "test_A" here
        ...
        ...

是否可以在测试用例中调用测试用例。这个问题是关于python selenium单元测试的。

现在我收到以下错误: ValueError:'ABC ...

中没有这样的测试方法

0 个答案:

没有答案