_acs-automated-testing__markup_parsing (private)

 _acs-automated-testing__markup_parsing

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

Partial Call Graph (max 5 caller/called nodes):
%3 aa_equals aa_equals (public) aa_false aa_false (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_section aa_section (public) _acs-automated-testing__markup_parsing _acs-automated-testing__markup_parsing _acs-automated-testing__markup_parsing->aa_equals _acs-automated-testing__markup_parsing->aa_false _acs-automated-testing__markup_parsing->aa_log _acs-automated-testing__markup_parsing->aa_log_result _acs-automated-testing__markup_parsing->aa_section

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
        aa_section "Markup with form"

        set form {
            <div><span></span><form> <input name="a" type="number" value="1">
            <input name="a" type="number" value="1">
            <br/>
            <input name="b" type="button" value="Clicked">
            <span>Test stuff</span>
            <input name="c" type="date" value="2022-09-09">
            <input name="d" type="radio" value="a">
            <input name="d" type="radio" value="b">
            <input name="d" type="radio" value="c">
            <input name="e" type="radio" value="a" checked>
            <input name="e" type="radio" value="b">
            <input name="e" type="radio" value="c">
            <input type="color" name="f" value="#ff0000">
            <select name="g"><option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            </select>
            <select name="h"><option value="1">1</option>
            <option value="2" selected>2</option>
            <option value="3">3</option>
            </select></div>
        }

        set form [acs::test::get_form $form //form]

        set fields [acs::test::form_get_fields $form]

        aa_false "Form is not empty"  [acs::test::form_is_empty $form]

        foreach {k v} {
            a 1
            b Clicked
            c 2022-09-09
            e "a"
            f "#ff0000"
            h 2
        } {
            aa_equals "'$k' has value '$v' in the form"  [dict get $fields $k$v
        }

        foreach empty {d g} {
            aa_false "Field '$empty' had no value and is not in the fields"  [dict exists $fields $empty]
        }

        aa_section "Markup with no form"
        set form {
            <html>
            <div><span>1</span></div>
            <br/>
            <span>Test stuff</span>
            </html>
        }

        aa_true "Form is empty"  [acs::test::form_is_empty [acs::test::get_form $form //form]]

        acs::test::dom_html root $form {
            aa_equals "We get the text from the second span"  [acs::test::xpath::get_text $root "/html/span""Test stuff"
            acs::test::xpath::equals $root {"/html/span" "Test stuff"}
            acs::test::xpath::non_empty $root "/html/span"
        }
    }} {
          aa_log "Running testcase body $body_count"
          set ::__aa_test_indent [info level]
          set catch_val [catch $testcase_body msg]
          if {$catch_val != 0 && $catch_val != 2} {
              aa_log_result "fail" "markup_parsing (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: