Example #1
0
 def test_moban_mfkt(self):
     homepage = SuperHomePage(self.driver)
     homepage.click_home()  # 调用页面对象类中的点击搜索按钮方法,点击首页
     time.sleep(2)
     homepage.click_moban_module()  # 点击模板模块
     time.sleep(2)
     homepage.click_moban_mfkt()  # 点击魔法抠图
     homepage.nowwindow()  # 当前窗口
     time.sleep(2)
     homepage.get_windows_img()  # 调用基类截图方法
     kt_text_link = "xpath=>.//*[@id='cutMain-search']"
     el = homepage.get_text(kt_text_link)
     try:
         assert '魔法抠图' in homepage.get_page_title(
         ) and '搜索宝贝' in el  # 调用页面对象继承基类中的获取页面标题方法
         print('Test Pass.')
     except Exception as e:
         print('Test Fail.', format(e))
Example #2
0
 def test_moban_hdhb(self):
     homepage = SuperHomePage(self.driver)
     homepage.click_home()  # 调用页面对象类中的点击搜索按钮方法,点击首页
     time.sleep(2)
     homepage.click_moban_module()  # 点击模板模块
     time.sleep(2)
     homepage.click_moban_hdhb()  # 点击活动海报
     homepage.nowwindow()  # 当前窗口
     time.sleep(2)
     homepage.get_windows_img()  # 调用基类截图方法
     hd_text_link = "xpath=>.//*[@id='detailHaibao']/span"
     el = homepage.get_text(hd_text_link)
     try:
         assert '创建海报' in homepage.get_page_title(
         ) and '750详情海报' in el  # 调用页面对象继承基类中的获取页面标题方法
         print('Test Pass.')
     except Exception as e:
         print('Test Fail.', format(e))
Example #3
0
 def test_moban_ccmb(self):
     homepage = SuperHomePage(self.driver)
     homepage.click_home()  # 调用页面对象类中的点击搜索按钮方法,点击首页
     time.sleep(2)
     homepage.click_moban_module()  # 点击模板模块
     time.sleep(2)
     homepage.click_moban_ccmb()  # 点击尺寸模板
     homepage.nowwindow()  # 当前窗口
     time.sleep(2)
     homepage.get_windows_img()  # 调用基类截图方法
     cc_text_link = "xpath=>.//*[@id='J_slt-industry-btns']/span[1]"
     el = homepage.get_text(cc_text_link)
     try:
         assert '尺寸模板' in homepage.get_page_title(
         ) and '全部' in el  # 调用页面对象继承基类中的获取页面标题方法
         print('Test Pass.')
     except Exception as e:
         print('Test Fail.', format(e))
Example #4
0
 def test_moban_kfmb(self):
     homepage = SuperHomePage(self.driver)
     homepage.click_home()  # 调用页面对象类中的点击搜索按钮方法,点击首页
     time.sleep(2)
     homepage.click_moban_module()  # 点击模板模块
     time.sleep(2)
     homepage.click_moban_kfmb()  # 点击客服模板
     homepage.nowwindow()  # 当前窗口
     time.sleep(2)
     homepage.get_windows_img()  # 调用基类截图方法
     kf_text_link = "xpath=>.//*[@id='templ-box-2512']/div[2]/div[2]/div/a"
     el = homepage.get_text(kf_text_link)
     try:
         assert '客服模板' in homepage.get_page_title(
         ) and '开始制作' in el  # 调用页面对象继承基类中的获取页面标题方法
         print('Test Pass.')
     except Exception as e:
         print('Test Fail.', format(e))
Example #5
0
 def test_moban_pjtj(self):
     homepage = SuperHomePage(self.driver)
     homepage.click_home()  # 调用页面对象类中的点击搜索按钮方法,点击首页
     time.sleep(2)
     homepage.click_moban_module()  # 点击模板模块
     time.sleep(2)
     homepage.click_moban_pjtj()  # 点击评价推荐
     homepage.nowwindow()  # 当前窗口
     time.sleep(2)
     homepage.get_windows_img()  # 调用基类截图方法
     pj_text_link = "xpath=>.//*[@id='container']/div/div[1]/div/div[2]/div[2]/div/div[1]/div[1]/table/tbody/tr[2]/td[3]/span"
     el = homepage.get_text(pj_text_link)
     try:
         assert '评价推荐' in homepage.get_page_title(
         ) and '查询' in el  # 调用页面对象继承基类中的获取页面标题方法
         print('Test Pass.')
     except Exception as e:
         print('Test Fail.', format(e))
Example #6
0
 def test_moban_ztsp(self):
     homepage = SuperHomePage(self.driver)
     homepage.click_home()  # 调用页面对象类中的点击搜索按钮方法,点击首页
     time.sleep(2)
     homepage.click_moban_module()  # 点击模板模块
     time.sleep(2)
     homepage.click_moban_ztsp()  # 点击主图视频
     homepage.nowwindow()  # 当前窗口
     time.sleep(2)
     homepage.get_windows_img()  # 调用基类截图方法
     sp_text_link = "xpath=>.//*[@id='J-ui-step']/div[2]/div/div[1]/div[1]/div/span[3]/form/span"
     el = homepage.get_text(sp_text_link)
     try:
         assert '主图视频' in homepage.get_page_title(
         ) and '搜索宝贝' in el  # 调用页面对象继承基类中的获取页面标题方法
         print('Test Pass.')
     except Exception as e:
         print('Test Fail.', format(e))
Example #7
0
 def test_moban_ztsy(self):
     homepage = SuperHomePage(self.driver)
     homepage.click_home()  # 调用页面对象类中的点击搜索按钮方法,点击首页
     time.sleep(2)
     homepage.click_moban_module()  # 点击模板模块
     time.sleep(2)
     homepage.click_moban_ztsy()  # 点击主图水印
     homepage.nowwindow()  # 当前窗口
     time.sleep(2)
     homepage.get_windows_img()  # 调用基类截图方法
     zt_text_link = "xpath=>.//*[@id='container']/div/div[1]/div/div/div[1]/ul/li[1]/span"
     el = homepage.get_text(zt_text_link)
     try:
         assert '折扣水印' in homepage.get_page_title(
         ) and '折扣水印' in el  # 调用页面对象继承基类中的获取页面标题方法
         print('Test Pass.')
     except Exception as e:
         print('Test Fail.', format(e))