follow me icons

Thursday, May 24, 2012

GEB - selecting an element with partial name

To select an element on a webpage with a partial name in Geb and Groovy:
   static content = {
        elementField {elementName -> $('select', name: contains(/button[$elementName/))}
   }

   def selectContent(String selectOptionName, String value) {
        browser.elementField(selectOptionName).value(value)
   }

No comments:

Post a Comment