delChapterPage.py 490 B

12345678910111213141516
  1. from selenium.webdriver.common.by import By
  2. from base.WebKeys import WebKeys
  3. class DelChapter(WebKeys):
  4. def del_chapter(self):
  5. self.locator_with_wait(By.XPATH,'//*[@class="book_list"]//td/a[2]').click()
  6. self.locator_with_wait(By.LINK_TEXT,"确定").click()
  7. # 找到所有的书
  8. ele=self.locators_with_wait(By.XPATH,'//*[@id="bookList"]//td[1]')
  9. name_list=[]
  10. for i in ele:
  11. name_list.append(i.text)
  12. return name_list