class CodecWidget(object): '''Wraps the "codecs" customization widget''' DEFAULT_FIELDSET_ID = 'fld-codeclist' def __init__(self, fieldset_id=DEFAULT_FIELDSET_ID): base = world.browser.find_element_by_id(fieldset_id) self._checkbox = Checkbox(base.find_element_by_id('it-codec-active')) self._pane = ListPane(base.find_element_by_id('codeclist')) def customize(self, codecs): self._checkbox.check() self._pane.remove_all() for codec in codecs: self._pane.add(codec) def uncustomize(self): self._pane.remove_all() self._checkbox.uncheck() def add(self, codec): self._checkbox.check() self._pane.add(codec) def remove(self, codec): self._pane.remove(codec)
def __init__(self, fieldset_id=DEFAULT_FIELDSET_ID): base = world.browser.find_element_by_id(fieldset_id) self._checkbox = Checkbox(base.find_element_by_id('it-codec-active')) self._pane = ListPane(base.find_element_by_id('codeclist'))
def add_agents_to_queue(agents): common.go_to_tab('Members') pane = ListPane.from_id('agentlist') for agent in agents: pane.add_contains(agent)
def remove_agents_from_queue(agents): common.go_to_tab('Members') pane = ListPane.from_id('agentlist') for agent in agents: pane.remove_contains(agent)
def add_secretary(secretary): pane = ListPane.from_id('userlist') pane.add_contains(secretary)
def _get_services_list(): return ListPane.from_id('servicelist')