class TestContact:

    def setup(self):
        self.work = Wework()
        self.contact = ContactPage(self.work)

    def teardown(self):
        sleep(5)
        self.work.quit()

    def test_add_member(self):
        self.contact.add_member("seveniruby", "seveniruby_1", "seveniruby_1", "15600534700")
        assert self.contact.get_tips() == "OK"

    def test_add_member_chinese(self):
        self.contact.add_member("思寒", "思寒", "seveniruby_1", "15600534701")
        assert self.contact.get_tips() == "OK"

    def test_delete(self):
        udid = str(time())
        self.contact.add_member("思寒"+udid, "思寒"+udid, "seveniruby_1"+udid, "15600534701")

    def test_update_profile(self):
        self.contact.search("seveniruby").update(name="seveniruby %s" % str(time()))

    def test_disable_profile(self):
        element_disable = self.contact.search("seven")
        element_disable.disable()
        # assert self.waitinfo(By.CSS_SELECTOR, '.ww_tip .success') == True

    def test_enable_profile(self):
        self.contact.search("seven").enable()
Beispiel #2
0
class TestContact:
    def setup(self):
        self.work = Wework()
        self.contact = ContactPage(self.work)

    def teardown(self):
        sleep(20)
        self.work.quit()

    def test_add_member(self):
        self.contact.add_member("seveniruby", "seveniruby", "seveniruby",
                                "15600534700")
        assert self.contact.get_tips() == "OK"

    def test_add_member_chinese(self):
        self.contact.add_member("思寒", "思寒", "seveniruby_1", "15600534701")
        assert self.contact.get_tips() == "OK"

    def test_delete(self):
        udid = str(time())
        self.contact \
            .add_member("思寒" + udid, "思寒" + udid, "seveniruby_1" + udid, "15600534701")

    def test_update_profile(self):
        self.contact.search("seveniruby").update(name="seveniruby %s" %
                                                 str(time()))
Beispiel #3
0
class TestContact:
    def setup(self):
        self.work = Wework()
        self.contact = ContactPage(self.driver)

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

    def test_add_member(self):
        contact = ContactPage(self.driver)
        contact.add_member("mango", "man", "go", "13011112222")
        assert contact.get_tips() == "OK"

    def test_add_member_Chinese(self):
        self.contact.add_member("慢慢", "满", "go_1", "13011112223")
        assert self.contact.get_tips() == "OK"

    def test_delete_member(self):
        udid = str(time())
        #如果一个对象方法返回的是PO自身,那么可以采用链式调用
        self.contact.add_member("慢慢"+udid, "满"+udid, "go_1"+udid, "13011112224")\
            .delete_member()

    def test_update_profile(self):
        self.contact.search("121")
Beispiel #4
0
class TestManager:
    def setup(self):
        self.work = Wework()
        self.manager = ManagerPage(self.work)
        # self._driver.find_element_by_id('menu_manageTools').click()

    def teardown(self):
        sleep(5)
        self.work.quit()

    def test_goto_picture(self):
        self.manager.goto_image()

    def test_add_image(self):
        self.manager.goto_image().add_image(r"E:\照片\壁纸\1.jpg")
Beispiel #5
0
class TestContact:
    def setup(self):
        self.work = Wework()
        self.contact = ContactPage(self.work)

    def teardown(self):
        sleep(10)
        self.work.quit()

    def test_add_member(self):
        self.contact.add_member("feng", "feng", "feng", "12222222222")
        assert self.contact.get_tips() == "OK"

    def test_delete(self):
        udid = str(time())
        self.contact\
            .add_member("x" + udid, "x" + udid, "x_1" + udid, "111111111")

    def test_update_profile(self):
        self.contact.search("xiao").update(name="xiao %s" % str(time()))
Beispiel #6
0
class TestContact:
    def setup(self):
        self.work = Wework()
        self.contact = ContactPage(self.work)

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

    def test_add_menber(self):
        self.contact.add_menber("namesdaff", "aliasasss",
                                "[email protected]", "D:\IMAGE\images.jpg")
        assert self.contact.get_tips() == "ok"

    def test_delete(self):
        udid = str(time())
        self.contact.add_menber("name" + udid, "asdasf" + udid,
                                "*****@*****.**" + udid,
                                "picture").delet_menber()

    def test_update_profile(self):
        self.contact.search("name").update(name="name %s" % str(time()))
Beispiel #7
0
 def __init__(self, wework: Wework):
     self._driver = wework.driver
     wework.goto_contactpage()
     self.contact = ContactPage(wework)
Beispiel #8
0
 def setup(self):
     self.work = Wework()
     self.desc = DescPage(self.work)
Beispiel #9
0
 def setup(self):
     self.work = Wework()
     self.contact = ContactPage(self.work)
 def __init__(self, wework: Wework):
     self._driver = wework.driver
     wework.goto_managepage()
Beispiel #11
0
 def setup(self):
     self.work=Wework()
     self.search=SearchPage(self.work)
Beispiel #12
0
 def setup(self):
     self.work = Wework()
     self.manager = ManagerPage(self.work)