Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
 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'))
Ejemplo n.º 3
0
def add_agents_to_queue(agents):
    common.go_to_tab('Members')
    pane = ListPane.from_id('agentlist')
    for agent in agents:
        pane.add_contains(agent)
Ejemplo n.º 4
0
def remove_agents_from_queue(agents):
    common.go_to_tab('Members')
    pane = ListPane.from_id('agentlist')
    for agent in agents:
        pane.remove_contains(agent)
Ejemplo n.º 5
0
def add_secretary(secretary):
    pane = ListPane.from_id('userlist')
    pane.add_contains(secretary)
Ejemplo n.º 6
0
def remove_agents_from_queue(agents):
    common.go_to_tab('Members')
    pane = ListPane.from_id('agentlist')
    for agent in agents:
        pane.remove_contains(agent)
Ejemplo n.º 7
0
def add_agents_to_queue(agents):
    common.go_to_tab('Members')
    pane = ListPane.from_id('agentlist')
    for agent in agents:
        pane.add_contains(agent)
Ejemplo n.º 8
0
def _get_services_list():
    return ListPane.from_id('servicelist')
Ejemplo n.º 9
0
def add_secretary(secretary):
    pane = ListPane.from_id('userlist')
    pane.add_contains(secretary)