private ArrayList<String> extractInputsOrOutputs (FilterBean fb, String cssSelector) throws ParserException {
        NodeFilter filter = new CssSelectorNodeFilter(cssSelector);
        fb.setFilters(new NodeFilter[] {filter});
        NodeList nodeList = fb.getNodes();
        if (nodeList == null || nodeList.size() == 0) {
            throw new ParserException("Parsing failed - no testcases were extracted.");
        }
        Node[] nodes = nodeList.toNodeArray();
        ArrayList<String> inputs = new ArrayList<>();
        for (Node n : nodes) {
            /* The children of each node look like this:
             * div class="title"
             * pre
             * 3 4 1
             * br /
             * 1 2 3
             * br /
             * 2 3 5
             * br /
             * /pre
             */
            NodeList childrenNodeList = n.getChildren();
            if (childrenNodeList == null) {
                throw new ParserException("Parsing failed.");
            }
            Node[] children = childrenNodeList.toNodeArray();
            StringBuilder contents = new StringBuilder();
            for (Node child : children) {
                if (child instanceof TextNode) {
                    contents.append(Translate.decode(child.getText()));
                } else if (child instanceof TagNode && child.getText().contains("br")) {
                    contents.append("\n");
                }
            }
            String contentsString = contents.toString();
            if (contentsString.isEmpty()) {
                throw new ParserException("Parsing failed.");
            } 
            inputs.add(contentsString);
        }
        return inputs;
    }