@@ -144,11 +144,12 @@ trait InputFieldBehaviour extends JettySpec with matchers.should.Matchers with S
144144 fn(" secret1" ).value should be (" " )
145145
146146 pressKeys(" first secret!" )
147- fn(" secret1" ).value should be (" first secret!" )
147+ // Email field won't allow space to be entered by key.
148+ fn(" secret1" ).value should be (if (file == " emailfield.html" ) " firstsecret!" else " first secret!" )
148149 pressKeys(" second secret!" )
149- fn(" secret1" ).value should be (" first secret! second secret!" )
150+ fn(" secret1" ).value should be (if (file == " emailfield.html " ) " firstsecret!secondsecret! " else " first secret! second secret!" )
150151 pressKeys(" third secret!" )
151- fn(" secret1" ).value should be (" first secret! second secret! third secret!" )
152+ fn(" secret1" ).value should be (if (file == " emailfield.html " ) " firstsecret!secondsecret!thirdsecret! " else " first secret! second secret! third secret!" )
152153 }
153154
154155 }
@@ -906,7 +907,7 @@ class WebBrowserSpec extends JettySpec with matchers.should.Matchers with SpanSu
906907 it should behave like enterField[TelField ](" telfield.html" , telField _, " TelField" , " tel2" )
907908 it should behave like enterField[UrlField ](" urlfield.html" , urlField _, " UrlField" , " url2" )
908909
909- it(" should allow text to be entered in the active element if it is a email field." ) {
910+ it(" should allow non-space text to be entered in the active element if it is a email field." ) {
910911 go to (host + " emailfield.html" )
911912 pageTitle should be (" EmailField" )
912913
@@ -921,11 +922,11 @@ class WebBrowserSpec extends JettySpec with matchers.should.Matchers with SpanSu
921922 emailField(" secret1" ).value should be (" " )
922923
923924 pressKeys(" first secret!" )
924- emailField(" secret1" ).value should be (" first secret !" )
925+ emailField(" secret1" ).value should be (" firstsecret !" )
925926 pressKeys(" second secret!" )
926- emailField(" secret1" ).value should be (" first secret! second secret !" )
927+ emailField(" secret1" ).value should be (" firstsecret!secondsecret !" )
927928 pressKeys(" third secret!" )
928- emailField(" secret1" ).value should be (" first secret! second secret! third secret !" )
929+ emailField(" secret1" ).value should be (" firstsecret!secondsecret!thirdsecret !" )
929930 }
930931
931932 it(" should allow text to be entered in the active element if it is a search field." ) {
@@ -1332,7 +1333,7 @@ class WebBrowserSpec extends JettySpec with matchers.should.Matchers with SpanSu
13321333 }
13331334
13341335 it(" isScreenshotSupported should return false for HtmlUnitDriver" ) {
1335- val driver = try new HtmlUnitDriver catch { case e : Throwable => cancel(e) }
1336+ val driver = try new HtmlUnitDriver ( true ) catch { case e : Throwable => cancel(e) }
13361337 try isScreenshotSupported(driver) should be (false )
13371338 finally close()(driver)
13381339 }
0 commit comments