acs::test::xpath::get_text (public)

 acs::test::xpath::get_text root xpath

Defined in packages/acs-automated-testing/tcl/aa-test-procs.tcl

Get a text element from tdom via XPath expression. If the XPath expression matches multiple nodes, return a list.

Parameters:
root (required)
xpath (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_markup_parsing markup_parsing (test acs-automated-testing) acs::test::xpath::get_text acs::test::xpath::get_text test_markup_parsing->acs::test::xpath::get_text acs::test::xpath::equals acs::test::xpath::equals (public) acs::test::xpath::equals->acs::test::xpath::get_text acs::test::xpath::non_empty acs::test::xpath::non_empty (public) acs::test::xpath::non_empty->acs::test::xpath::get_text

Testcases:
markup_parsing
Source code:
        set nodes [$root selectNodes $xpath]
        switch [llength $nodes] {
            0 {set result ""}
            1 {set result [$nodes asText]}
            default {
                set result ""
                foreach n $nodes {
                    lappend result [$n asText]
                }
            }
        }
        return $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: