Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. try:
  2. if questionType == 'text':
  3. self.driver.implicitly_wait(0)
  4.  
  5. (question.find_element_by_css_selector("textarea").send_keys(str(answer))
  6. if
  7. question.find_elements_by_css_selector("textarea")
  8. else
  9. question.find_element_by_css_selector("input").send_keys(answer))
  10.  
  11. self.driver.implicitly_wait(15)
  12.  
  13. elif questionType == 'date':
  14. try:
  15. answer = answer.strftime('%m/%d/%Y')
  16. question.find_element_by_css_selector("input").send_keys(answer)
  17. page.click()
  18.  
  19. except Exception as e:
  20. raise Errors.RequiredDataError('Issues with Assessment Date -- {}'.format(e))
  21. elif questionType == 'radio':
  22. question.find_element_by_css_selector("input[value='{}']".format(answer)).click()
  23.  
  24. else:
  25. self.driver.find_element_by_css_selector("#publishButton").click()
  26.  
  27. invalid syntax (<unknown>, line 199)pylint(syntax-error)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement