Ejemplo n.º 1
0
 def test_notice_14(self):
     '''新建公告_添加投票'''
     driver = self.driver
     user.login(self)
     sleep(2)
     pub.equal(self)
     print driver.title
     page_notice.gotoNotice(self)
     sleep(1)
     driver.find_element_by_css_selector('span.mid_text').click()
     page_notice.addVote(self)
     page_notice.addNotice(self)
Ejemplo n.º 2
0
 def test_notice_03(self):
     '''创建公告_置顶'''
     driver = self.driver
     user.login(self)
     sleep(2)
     pub.equal(self)
     print driver.title
     sleep(1)
     page_notice.gotoNotice(self)
     sleep(2)
     driver.find_element_by_css_selector('span.mid_text').click()
     sleep(1)
     driver.find_element_by_xpath('//div[2]/label[4]').click()
     sleep(1)
     page_notice.addNotice(self)
Ejemplo n.º 3
0
 def test_notice_07(self):
     '''允许评论-发表评论'''
     driver = self.driver
     user.login(self)
     sleep(2)
     pub.equal(self)
     print driver.title
     sleep(1)
     page_notice.gotoNotice(self)
     sleep(1)
     driver.find_element_by_css_selector('span.mid_text').click()
     sleep(1)
     driver.find_element_by_xpath('//*[@id="addScrollDiv"]/ul/li[7]/div[2]/label[1]').click()
     driver.find_element_by_xpath('//div[2]/label[4]').click()
     page_notice.addNotice(self)
     now = pub.now()
     driver.find_element_by_xpath("//*[@id='cke_notice_comment_desc_editor']/div/div/div").send_keys(u'评论-我是机器人%s'%now)
     sleep(1)
     driver.find_element_by_xpath("//div[@id='notice-detail-warp']/div[4]/div[3]/button").click()
     sleep(1)
     print u'已发表评论内容:评论-我是机器人%s'%now