class TestWeb:
    def setup(self):
        self.driver = BasePage()

    def teardown(self):
        self.driver.quit()

    def test_web1(self):
        self.driver.get('https://www.baidu.com')
        loc = ('xpath', '//*[@type="submit"]')
        ele = self.driver.find_element(loc)
        print(f'ele:{ele}')
        print(f'ele_value:{ele.get_attribute("value")}')
Exemple #2
0
class TestWeb:
    def setup_class(self):
        self.driver = BasePage(dcs='hub')

    def setup(self):
        self.driver.get('https://www.baidu.com')

    def teardown(self):
        self.driver.quit()

    def test_web1(self):
        logger.info('test_web1')

    def test_web2(self):
        logger.info('test_web2')

    def test_web3(self):
        logger.info('test_web3')

    def test_web4(self):
        logger.info('test_web4')
class TestDemo:
    def setup_class(self):
        self.driver = BasePage(dcs='hub',userhadless='true')

    def setup(self):
        self.driver.get('https://taobao.com')

    def teardown(self):
        self.driver.quit()

    def test_web5(self):
        logger.info('test_web5')

    def test_web6(self):
        logger.info('test_web6')

    def test_web7(self):
        logger.info('test_web7')

    def test_web8(self):
        logger.info('test_web8')
Exemple #4
0
 def setup_class(self):
     self.driver = BasePage(dcs='hub')
 def setup_class(self):
     self.driver = BasePage(dcs='hub',userhadless='true')
 def setup(self):
     self.driver = BasePage()