- t( "Is Visible", "input:visible", ["text1","text2","radio1","radio2","check1","check2","name"] );
- t( "Is Hidden", "input:hidden", ["hidden1","hidden2"] );
-
- t( "Form element :input", ":input", ["text1", "text2", "radio1", "radio2", "check1", "check2", "hidden1", "hidden2", "name", "button", "area1", "select1", "select2", "select3"] );
- t( "Form element :radio", ":radio", ["radio1", "radio2"] );
- t( "Form element :checkbox", ":checkbox", ["check1", "check2"] );
- t( "Form element :text", ":text", ["text1", "text2", "hidden2", "name"] );
- t( "Form element :radio:checked", ":radio:checked", ["radio2"] );
- t( "Form element :checkbox:checked", ":checkbox:checked", ["check1"] );
- t( "Form element :checkbox:checked, :radio:checked", ":checkbox:checked, :radio:checked", ["check1", "radio2"] );
-});
-
-test("basic xpath", function() {
- expect(15);
- ok( jQuery.find("//*").length >= 30, "All Elements (//*)" );
- t( "All Div Elements", "//div", ["main","foo"] );
- t( "Absolute Path", "/html/body", ["body"] );
- t( "Absolute Path w/ *", "/* /body", ["body"] );
- t( "Long Absolute Path", "/html/body/dl/div/div/p", ["sndp","en","sap"] );
- t( "Absolute and Relative Paths", "/html//div", ["main","foo"] );
- t( "All Children, Explicit", "//code/*", ["anchor1","anchor2"] );
- t( "All Children, Implicit", "//code/", ["anchor1","anchor2"] );
- t( "Attribute Exists", "//a[@title]", ["google"] );
- t( "Attribute Equals", "//a[@rel='bookmark']", ["simon1"] );
- t( "Parent Axis", "//p/..", ["main","foo"] );
- t( "Sibling Axis", "//p/../", ["firstp","ap","foo","first","firstUL","empty","form","floatTest","iframe","sndp","en","sap"] );
- t( "Sibling Axis", "//p/../*", ["firstp","ap","foo","first","firstUL","empty","form","floatTest","iframe","sndp","en","sap"] );
- t( "Has Children", "//p[a]", ["firstp","ap","en","sap"] );
-
- $("#foo").each(function() {
- isSet( $("/p", this).get(), q("sndp", "en", "sap"), "Check XPath context" );
- });
-});
+ t( "Is Visible", "#form input:visible", ["text1","text2","radio1","radio2","check1","check2","name"] );
+ t( "Is Hidden", "#form input:hidden", ["hidden1","hidden2"] );
+
+ t( "Form element :input", "#form :input", ["text1", "text2", "radio1", "radio2", "check1", "check2", "hidden1", "hidden2", "name", "button", "area1", "select1", "select2", "select3"] );
+ t( "Form element :radio", "#form :radio", ["radio1", "radio2"] );
+ t( "Form element :checkbox", "#form :checkbox", ["check1", "check2"] );
+ t( "Form element :text", "#form :text", ["text1", "text2", "hidden2", "name"] );
+ t( "Form element :radio:checked", "#form :radio:checked", ["radio2"] );
+ t( "Form element :checkbox:checked", "#form :checkbox:checked", ["check1"] );
+ t( "Form element :checkbox:checked, :radio:checked", "#form :checkbox:checked, #form :radio:checked", ["check1", "radio2"] );