src/Context/FormstoneContext.php
private function openComponent(DocumentElement $page, $component, $field)
    {
        $select = $page->find('css', sprintf('#%s', $field));
        if (!$select) {
            throw new \Exception(sprintf('No select "%s" found', $field));
        }

        $fieldName = sprintf('.fs-%1$s .fs-%1$s-selected', $component);
        $choices   = $select->getParent()->find('css', $fieldName);
        if (!$choices) {
            throw new \Exception(sprintf('No field "%s" found', $field));
        }

        $choices->press();
    }
private function openComponent(DocumentElement $page, $component, $field)
    {
        $select = $page->find('css', sprintf('#%s', $field));
        if (!$select) {
            throw new \Exception(sprintf('No select "%s" found', $field));
        }

        $fieldName = sprintf('.fs-%1$s .fs-%1$s-selected', $component);
        $choices   = $select->getParent()->find('css', $fieldName);
        if (!$choices) {
            throw new \Exception(sprintf('No field "%s" found', $field));
        }

        $choices->press();
    }
private function openComponent ( DocumentElement $ page , $ component , $ field ) { $ select = $ page -> find ( 'css' , sprintf ( '#%s' , $ field ) ) ; if ( ! $ select ) { throw new \ Exception ( sprintf ( 'No select "%s" found' , $ field ) ) ; } $ fieldName = sprintf ( '.fs-%1$s .fs-%1$s-selected' , $ component ) ; $ choices = $ select -> getParent ( ) -> find ( 'css' , $ fieldName ) ; if ( ! $ choices ) { throw new \ Exception ( sprintf ( 'No field "%s" found' , $ field ) ) ; } $ choices -> press ( ) ; }
Open component choice list

@param DocumentElement $page
@param string          $component
@param string          $field
@throws \Exception
Open component choice list