示例#1
0
 def input_edit_driver(self, driver_pathname):
     """ Return :class:`DriverPage` associated with the input port. """
     chain = ActionChains(self.browser)
     chain.context_click(self.input_port).perform()
     time.sleep(0.5)
     self('edit_driver').click()
     editor_id = 'ObjectFrame_%s' % driver_pathname.replace('.', '-')
     return DriverPage(self.browser, self.port, (By.ID, editor_id))
示例#2
0
 def output_edit_driver(self, driver_pathname):
     """ Return :class:`DriverPage` associated with the output port. """
     # FIXME: can't get response from context click.
     chain = ActionChains(self.browser)
     chain.context_click(self.output_port).perform()
     time.sleep(0.5)
     self('edit_driver').click()
     editor_id = 'CE-%s' % driver_pathname.replace('.', '-')
     return DriverPage(self.browser, self.port, (By.ID, editor_id))
示例#3
0
 def editor_page(self, double_click=True, base_type='Component'):
     """ Return :class:`ComponentPage` for this component. """
     chain = ActionChains(self.browser)
     if double_click:
         chain.double_click(self.root).perform()
     else:
         self._context_click('edit_button')
     editor_id = 'CE-%s' % self.pathname.replace('.', '-')
     if base_type == 'Assembly':
         return AssemblyPage(self.browser, self.port, (By.ID, editor_id))
     elif base_type == 'Driver':
         return DriverPage(self.browser, self.port, (By.ID, editor_id))
     else:
         return ComponentPage(self.browser, self.port, (By.ID, editor_id))
示例#4
0
 def editor_page(self,
                 double_click=True,
                 base_type='Component',
                 version=ComponentPage.Version.OLD):
     """ Return :class:`ComponentPage` for this component. """
     chain = ActionChains(self.browser)
     if double_click:
         chain.double_click(self.root).perform()
     else:
         self._context_click('edit_button')
     editor_id = 'ObjectFrame_%s' % self.pathname.replace('.', '-')
     chain.release(None).perform()
     if base_type == 'Assembly':
         return AssemblyPage(self.browser, self.port, (By.ID, editor_id))
     elif base_type == 'Driver':
         return DriverPage(self.browser, self.port, (By.ID, editor_id))
     elif base_type == 'ImplicitComponent':
         return ImplicitComponentPage(self.browser,
                                      self.port, (By.ID, editor_id),
                                      version=version)
     else:
         return ComponentPage(self.browser,
                              self.port, (By.ID, editor_id),
                              version=version)