acs::test::xpath::get_form (public)
acs::test::xpath::get_form node xpath
Defined in packages/acs-automated-testing/tcl/aa-test-procs.tcl
Locate the HTML forms matching the XPath expression and retrieve its HTML attributes and the formfields in form of a Tcl dict.
- Parameters:
- node (required)
- xpath (required)
- Returns:
- Tcl dict with form attributes (keys starting with "@", and entry "fields")
- Author:
- Gustaf Neumann
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- markup_parsing, create_folder_with_page, create_form_with_form_instance
Source code: set d {} set formNodes [$node selectNodes $xpath] if {[llength $formNodes] > 1} { error "XPath expression must point to at most one HTML form" } else { #aa_log "xpath::get_form has form nodes '$formNodes'" foreach form $formNodes { foreach att [$node selectNodes $xpath/@*] { #aa_log "xpath::get_form form '$form' has attribute '$att'" dict set d @[lindex $att 0] [lindex $att 1] } dict set d fields [::acs::test::xpath::get_form_values $node $xpath] } } return $dXQL Not present: Generic, PostgreSQL, Oracle