Esempio 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)
Esempio 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'))
Esempio 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)
Esempio 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)
Esempio n. 5
0
def add_secretary(secretary):
    pane = ListPane.from_id('userlist')
    pane.add_contains(secretary)
Esempio 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)
Esempio 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)
Esempio n. 8
0
def _get_services_list():
    return ListPane.from_id('servicelist')
Esempio n. 9
0
def add_secretary(secretary):
    pane = ListPane.from_id('userlist')
    pane.add_contains(secretary)