diff --git a/Yesod/Test.hs b/Yesod/Test.hs
--- a/Yesod/Test.hs
+++ b/Yesod/Test.hs
@@ -421,10 +421,10 @@
       Just res -> return res
   let
     body = simpleBody res
-    mfor = parseHTML body
+    mlabel = parseHTML body
                 $// C.element "label"
                 >=> contentContains label
-                >=> attribute "for"
+    mfor = mlabel >>= attribute "for"
 
     contentContains x c
         | x `T.isInfixOf` T.concat (c $// content) = [c]
@@ -444,8 +444,11 @@
             , " which was not found. "
             ]
         name:_ -> return name
-        _ -> failure $ "More than one input with id " <> for
-    [] -> failure $ "No label contained: " <> label
+        [] -> failure $ "No input with id " <> for
+    [] ->
+      case filter (/= "") $ mlabel >>= (child >=> C.element "input" >=> attribute "name") of
+        [] -> failure $ "No label contained: " <> label
+        name:_ -> return name
     _ -> failure $ "More than one label contained " <> label
 
 (<>) :: T.Text -> T.Text -> T.Text
diff --git a/test/main.hs b/test/main.hs
--- a/test/main.hs
+++ b/test/main.hs
@@ -132,6 +132,14 @@
                 get ("/dynamic2/שלום" :: Text)
                 statusIs 200
                 bodyEquals "שלום"
+
+        ydescribe "labels" $ do
+            yit "can click checkbox" $ do
+                get ("/labels" :: Text)
+                request $ do
+                    setMethod "POST"
+                    setUrl ("/labels" :: Text)
+                    byLabel "Foo Bar" "yes"
     describe "cookies" $ yesodSpec cookieApp $ do
         yit "should send the cookie #730" $ do
             get ("/" :: Text)
@@ -173,6 +181,9 @@
             _ -> defaultLayout widget
     onStatic "html" $ dispatchTo $
         return ("<html><head><title>Hello</title></head><body><p>Hello World</p><p>Hello Moon</p></body></html>" :: Text)
+
+    onStatic "labels" $ dispatchTo $
+        return ("<html><label><input type='checkbox' name='fooname' id='foobar'>Foo Bar</label></html>" :: Text)
 
 
 cookieApp :: LiteApp
diff --git a/yesod-test.cabal b/yesod-test.cabal
--- a/yesod-test.cabal
+++ b/yesod-test.cabal
@@ -1,5 +1,5 @@
 name:               yesod-test
-version:            1.2.3
+version:            1.2.3.1
 license:            MIT
 license-file:       LICENSE
 author:             Nubis <nubis@woobiz.com.ar>
