Example #1
0
 def DeleteAdminExcise(self, exciseName):
     WebOp.shared_wd.find_element_by_css_selector(
         u'span[title="考试列表"]').click()  # 选择考试列表
     xpath = u'//a[text()="{}"]//..//following-sibling::td//a//span[text()="删除"]'.format(
         exciseName)
     WebOp.shared_wd.find_elements_by_xpath(
         xpath)[0].click()  # 选择考试“d_SU高中英语(模板出卷)”并删除第一个
     Toolkit.Prompt()
Example #2
0
 def DeleteExcise1(self, homeWork):
     WebOpTeacher.EnterTab(WebOpTeacher(), u'首页')
     Toolkit.is_visible('//i[@class="fa fa-pencil"]')  # 确定已经切换到首页了
     WebOpTeacher.FindHomeWork(WebOpTeacher(), homeWork)
     tabLinkXpath = u"//span[text()='{}']//../preceding-sibling::span/a[text()='查看成绩']".format(homeWork)  # 要删除练习的试卷名称(找在作业批改中的)
     homeWorkele = WebOp.shared_wd.find_element_by_xpath(tabLinkXpath)
     homeWorkele.click()
     WebOp.shared_wd.find_element_by_link_text('作业布置').click()  # 作业布置
     WebOp.shared_wd.find_elements_by_css_selector('span.caret')[0].click()  # 编辑练习下拉框
     WebOp.shared_wd.find_element_by_css_selector('a>span.ng-scope').click()  # 删除练习
     # 对prompt对话框的操作
     time.sleep(1)
     Toolkit.Prompt()
Example #3
0
 def DeleteAdminExcise(self, exciseName):
     WebOp.shared_wd.find_element_by_css_selector(
         u'span[title="考试列表"]').click()  # 选择考试列表
     Toolkit.is_visible('//span[text()="考试名称"]')
     WebOp.shared_wd.refresh()
     WebOp.shared_wd.find_elements_by_css_selector(
         'table.channel-table td')[0].click()  # 点击全部
     xpath = u'//a[text()="{}"]//..//following-sibling::td//a//span[text()="删除"]'.format(
         exciseName)
     if Toolkit.IsElementPresentxpath(xpath):
         WebOp.shared_wd.find_elements_by_xpath(
             xpath)[0].click()  # 选择考试“d_SU高中英语(模板出卷)”并删除第一个
         Toolkit.Prompt()
Example #4
0
 def XueShengChengJi(self):
     WebOp.shared_wd.find_element_by_css_selector(
         'div>button[auth="publish||is_super"]').click()
     Toolkit.Prompt()
     WebOp.shared_wd.find_element_by_css_selector(
         'div>button.btn-white').click()