@@ -144,11 +144,12 @@ trait InputFieldBehaviour extends JettySpec with matchers.should.Matchers with S
144
144
fn(" secret1" ).value should be (" " )
145
145
146
146
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!" )
148
149
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!" )
150
151
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!" )
152
153
}
153
154
154
155
}
@@ -906,7 +907,7 @@ class WebBrowserSpec extends JettySpec with matchers.should.Matchers with SpanSu
906
907
it should behave like enterField[TelField ](" telfield.html" , telField _, " TelField" , " tel2" )
907
908
it should behave like enterField[UrlField ](" urlfield.html" , urlField _, " UrlField" , " url2" )
908
909
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." ) {
910
911
go to (host + " emailfield.html" )
911
912
pageTitle should be (" EmailField" )
912
913
@@ -921,11 +922,11 @@ class WebBrowserSpec extends JettySpec with matchers.should.Matchers with SpanSu
921
922
emailField(" secret1" ).value should be (" " )
922
923
923
924
pressKeys(" first secret!" )
924
- emailField(" secret1" ).value should be (" first secret !" )
925
+ emailField(" secret1" ).value should be (" firstsecret !" )
925
926
pressKeys(" second secret!" )
926
- emailField(" secret1" ).value should be (" first secret! second secret !" )
927
+ emailField(" secret1" ).value should be (" firstsecret!secondsecret !" )
927
928
pressKeys(" third secret!" )
928
- emailField(" secret1" ).value should be (" first secret! second secret! third secret !" )
929
+ emailField(" secret1" ).value should be (" firstsecret!secondsecret!thirdsecret !" )
929
930
}
930
931
931
932
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
1332
1333
}
1333
1334
1334
1335
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) }
1336
1337
try isScreenshotSupported(driver) should be (false )
1337
1338
finally close()(driver)
1338
1339
}
0 commit comments