Skip to content
The Chat Archive
Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written) OpenAssistant Conversations (oasst2)

xpath to get a span node that contains the text " Estimate ". HTML <span class="">…

In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
  1. User

    xpath to get a span node that contains the text " Estimate ".

    HTML

  2. Assistant

    Can you be more specific with your question?

  3. User

    I'm looking for the xPath I can use in my javascript to refer to that HTML element.

  4. Assistant

    The XPath expression to use would be //span[contains(text(), ' Estimate ')].

    You can fetch all matching elements in JavaScript using the following snippet:

    // Iterator over all span elements that contain ' Estimate '.
    const iterator = document.evaluate("//span[contains(text(), ' Estimate ')]", document, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
    

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.