Blog do projektu Open Source JavaHotel

sobota, 1 stycznia 2011

BoaTester - new action to Selenium Helper

I've added new action to my Selenium extension BoaTester framework. It was very simple - just add new class handling that action and activating trigger.

SeleniumHelper.py
Activation:   
self.registerAction('selectCombo',selectCombo(), 2)
Action class:
class selectCombo(seleniumTypeContext) :
    """ Action class for 'selectCombo' action
    First parameter: element selector for 'select' tag
    Second parameter: Value to be selected
    """
    def do(self):
        locator = self.cparam[0]
        label = self.cparam[1]
        self.se.select(locator, 'value=' + label)


It covers GWT widget ListBox which renders as "select" HTML tag. 

Brak komentarzy:

Prześlij komentarz