return
except NoSuchElementException:
pass
- self.s.open_nav_section('Copy of Shyamalendu Bose')
old_windows = self.s.w.get_window_handles()
- self.s.w.find_element_by_link_text('Copy To').click()
+ #self.s.w.find_element_by_link_text('Duplicate').click()
+ # WebDriver doesn't support JavaScript prompts:
+ # http://code.google.com/p/selenium/wiki/FrequentlyAskedQuestions#Q:_Does_support_Javascript_alerts_and_prompts?
+ self.s.open_nav_section('facultyDirectory')
+ self.s.w.find_element_by_link_text('Developer').click()
+ time.sleep(self.s.wait_time)
+ self.s.w.find_element_by_link_text('From Template').click()
time.sleep(self.s.wait_time)
windows = self.s.w.get_window_handles()
current_window = self.s.w.get_current_window_handle()
self.s.logger.info('handling copy popup %s (from %s, old %s)'
% (popup, windows, current_window))
self.s.w.switch_to_window(popup)
- filename = self.s.w.find_element_by_id('Filename')
- filename.clear()
- filename.send_keys(
- '/sitecore/content/Home/physics/contact/facultyDirectory/%s'
- % name)
+ template = self.s.w.find_element_by_id('TemplateName')
+ template.clear()
+ template.send_keys('/Drexel/FacultyProfile')
+ faculty = self.s.w.find_element_by_id('ItemName')
+ faculty.clear()
+ faculty.send_keys(name)
self.s.w.find_element_by_id('OK').click()
- time.sleep(self.s.wait_time)
+ time.sleep(self.s.wait_time*5)
current_window = self.s.w.get_current_window_handle()
self.s.logger.info('handled copy popup %s, back to %s'
% (popup, current_window))